A226123 Number of terms of the form 2^k in Collatz(3x+1) trajectory of n.
1, 2, 5, 3, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5, 5, 5, 5, 5, 5, 5, 7, 9, 5, 5
Offset: 1
Keywords
Examples
a(3)=5 since Collatz trajectory of 3 contains terms 1,2,4,8 and 16.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a226123 = sum . map a209229 . a070165_row -- Reinhard Zumkeller, May 30 2013
-
Mathematica
coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; Table[Length[Select[coll[n],IntegerQ[Log[2,#]]&]],{n,87}]
Comments