User:Thebigh/mysandbox: Difference between revisions
Content added Content deleted
(...actually, THIS is the simplest program (:) |
(→Integer Sequence: -concise is good) |
||
Line 15: | Line 15: | ||
==Integer Sequence== |
==Integer Sequence== |
||
Given the number 1 as input the following program will, as its (3n-2)th step, produce the number 2^n. |
|||
<lang fractran> |
<lang fractran> {2/3, 9/2, 2/1}</lang> |
||
{{out}}<pre> |
|||
2^0 |
|||
2^1 |
|||
3^2 |
|||
2 x 3 |
|||
2^2 |
|||
2 x 3^2 |
|||
2^2 x 3 |
|||
2^3 |
|||
... |
|||
</pre> Regarding only the powers of two, we get 1,2,4,8,16, etc. |
|||
==Sort three variables== |
==Sort three variables== |