cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226123 Number of terms of the form 2^k in Collatz(3x+1) trajectory of n.

Original entry on oeis.org

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

Views

Author

Jayanta Basu, May 27 2013

Keywords

Comments

a(n) = sum(A209229(A070165(n,k)): k=1..A006577(n)). - Reinhard Zumkeller, May 30 2013

Examples

			a(3)=5 since Collatz trajectory of 3 contains terms 1,2,4,8 and 16.
		

Crossrefs

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}]