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.

A213909 Sum of all even numbers in Collatz (3x+1) trajectory of n.

Original entry on oeis.org

0, 2, 40, 6, 30, 46, 234, 14, 276, 40, 212, 58, 100, 248, 562, 30, 178, 294, 424, 60, 126, 234, 516, 82, 538, 126, 81178, 276, 366, 592, 80910, 62, 688, 212, 446, 330, 444, 462, 1894, 100, 81096, 168, 1090, 278, 416, 562, 80816, 130, 666, 588, 926, 178, 340
Offset: 1

Views

Author

Jayanta Basu, Mar 05 2013

Keywords

Examples

			a(5)=30 since Collatz trajectory of 5 is 5,16,8,4,2,1.
		

Crossrefs

Cf. A033493.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Total[Select[Collatz[n], EvenQ]], {n, 100}] (* T. D. Noe, Mar 05 2013 *)