login
A222597
Number of terms of the Collatz (3x+1) trajectory of n that are greater than n.
4
0, 0, 5, 0, 2, 3, 12, 0, 13, 1, 8, 1, 3, 8, 11, 0, 4, 7, 10, 0, 2, 4, 7, 0, 10, 1, 102, 3, 5, 8, 97, 0, 10, 2, 5, 2, 4, 5, 17, 0, 97, 1, 10, 1, 3, 5, 92, 0, 5, 4, 7, 0, 2, 95, 98, 0, 9, 1, 11, 4, 6, 91, 93, 0, 5, 3, 6, 0, 2, 3, 87, 0, 97, 1, 7, 1, 3, 10, 13, 0, 6
OFFSET
1,3
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Length[Select[Collatz[n], # > n &]], {n, 100}]
PROG
(PARI) a(n)=my(k=n, s); while(k>1, k=if(k%2, 3*k+1, k/2); if(k>n, s++)); s \\ Charles R Greathouse IV, Aug 26 2016
CROSSREFS
Cf. A033496, A213199 (location of zero and nonzero terms).
Sequence in context: A172035 A019625 A261165 * A021999 A021203 A276712
KEYWORD
nonn
AUTHOR
T. D. Noe, Mar 01 2013
STATUS
approved