OFFSET
1,1
LINKS
EXAMPLE
45 is in the sequence because 45 generates the trajectory of odd numbers : 45 -> 17 -> -> 13 -> 5 -> 1.
MAPLE
for n from 3 by 2 to 5000 do:i:=0:x:=n:n0:=n: u0:=0:for it from 1 to 1000 while(n0<>1 and u0=0) do: for a from 1 to 100 while(x mod 2 = 0 ) do: i:=i+1:x:=x/2: od:if x > n0 then u0:=1:else i:=i+1:n0:=x :x:=3*n0+1: fi:od: if u0=0 then printf(`%d, `, n):else fi:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 10 2012
STATUS
approved