A330732 a(n) is the smallest number whose odd hailstone sequence has length n (including 1 and itself) and is in descending order.
1, 5, 13, 17, 45, 241, 321, 1713, 9137, 24365, 36033, 173261, 231681, 630033, 1642769, 4380717, 11715629, 31241677, 41655569, 111081517, 148108689, 789913009, 1053217345, 1404289793, 3744772781, 9986060749, 13314747665, 35505993773, 94682650061, 128599099649
Offset: 1
Keywords
Examples
Consider a(8): [1713, 1285, 241, 181, 17, 13, 5, 1]; the odd hailstone sequence of 1713 is descending and has length 8. 1713 is the lowest such number.
Links
Programs
-
Mathematica
With[{s = Array[If[AllTrue[Differences@ #, # < 0 &], Length@ #, 0] &@ Select[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, #, # > 1 &], OddQ] &, 10^5]}, Array[FirstPosition[s, #][[1]] &, Max@ s]] (* Michael De Vlieger, Jan 01 2020 *)
-
PARI
is(k, n) = {my(x=k, v=List([])); while(x>1, if(x%2==0, x=x/2, listput(v, x); x=3*x+1)); 1+#v==n&&v==vecsort(v, , 4); } a(n) = {k=1; while(is(k, n)==0, k+=2); k; } \\ Jinyuan Wang, Dec 31 2019
Extensions
a(23)-a(30) from Kevin P. Thompson, Jul 23 2022
Comments