Hailstone sequence: Difference between revisions

m
(Added uBasic/4tH version)
Line 3,945:
;
 
val h27 = hail 27;
print "hailstone sequence for the number 27 has ";
Line 3,962:
print " and is of length ";
println ` ref (biggest, 1);</lang>
{{out}}
Output:
<pre>hailstone sequence for the number 27 has 112 elements starting with [27, 82, 41, 124] and ending with [8, 4, 2, 1].
The number less than 100,000 which has the longest hailstone sequence is at element 77031 and is of length 351</pre>
Anonymous user