A213916 Sum of all odd numbers in Collatz (3x+1) trajectory of n.
1, 1, 9, 1, 6, 9, 54, 1, 63, 6, 47, 9, 19, 54, 132, 1, 36, 63, 95, 6, 22, 47, 117, 9, 120, 19, 20262, 54, 76, 132, 20194, 1, 153, 36, 94, 63, 91, 95, 450, 6, 20235, 22, 248, 47, 81, 117, 20163, 9, 140, 120, 204, 19, 59, 20262, 20426, 54, 305, 76, 411, 132, 178
Offset: 1
Keywords
Examples
a(5)=6 since Collatz trajectory of 5 is 5,16,8,4,2,1.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[Total[Select[Collatz[n], OddQ]], {n, 100}] (* T. D. Noe, Mar 05 2013 *)
Comments