User:Thebigh/mysandbox: Difference between revisions

→‎Integer Sequence: -concise is good
(...actually, THIS is the simplest program (:)
(→‎Integer Sequence: -concise is good)
Line 15:
 
==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> 1 {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==
781

edits