A074735 Number of steps to reach an integer starting with (n+3)/4 and iterating the map x -> x*ceiling(x).
0, 3, 1, 2, 0, 3, 2, 8, 0, 1, 1, 1, 0, 3, 3, 2, 0, 2, 1, 3, 0, 2, 2, 2, 0, 1, 1, 1, 0, 7, 4, 4, 0, 4, 1, 2, 0, 4, 2, 3, 0, 1, 1, 1, 0, 2, 3, 4, 0, 2, 1, 8, 0, 4, 2, 3, 0, 1, 1, 1, 0, 6, 5, 4, 0, 3, 1, 2, 0, 5, 2, 4, 0, 1, 1, 1, 0, 5, 3, 2, 0, 2, 1, 3, 0, 2, 2, 2, 0, 1, 1, 1, 0, 4, 4, 5, 0, 6, 1, 2, 0, 3, 2, 5, 0
Offset: 1
Keywords
Programs
-
Mathematica
Table[Length[NestWhileList[# Ceiling[#]&,(n+3)/4,!IntegerQ[#]&]]-1,{n,110}] (* Harvey P. Dale, Apr 11 2020 *)
-
PARI
a(n)=if(n<0,0,s=(n+3)/4; c=0; while(frac(s)>0,s=s*ceil(s); c++); c)
Formula
Special cases: for k>= 0 a(4k+1) = 0, a(16k+10) = a(16k+11) = a(16k+12) = 1.
Extensions
Offset corrected by Sean A. Irvine, Jan 25 2025
Comments