A062059 Numbers with 9 odd integers in their Collatz (or 3x+1) trajectory.
33, 65, 66, 67, 130, 131, 132, 133, 134, 260, 261, 262, 264, 266, 268, 269, 273, 289, 520, 522, 524, 525, 528, 529, 532, 533, 536, 538, 546, 547, 555, 571, 577, 578, 579, 583, 633, 635, 1040, 1044, 1045, 1048, 1050, 1056, 1058, 1059, 1064, 1066, 1072, 1076, 1077
Offset: 1
Keywords
Examples
The Collatz trajectory of 33 is (33, 100, 50, 25, 76, 38, 19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1), which contains 9 odd integers.
References
- J. Shallit and D. Wilson, The "3x+1" Problem and Finite Automata, Bulletin of the EATCS #46 (1992) pp. 182-185.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- J. Shallit and D. Wilson, The "3x+1" Problem and Finite Automata, Bulletin of the EATCS #46 (1992) pp. 182-185.
- Eric Weisstein's World of Mathematics, Collatz Problem
- Wikipedia, Collatz conjecture
- Index entries for sequences related to 3x+1 (or Collatz) problem
- Index entries for 2-automatic sequences.
Crossrefs
Programs
-
Haskell
import Data.List (elemIndices) a062059 n = a062059_list !! (n-1) a062059_list = map (+ 1) $ elemIndices 9 a078719_list -- Reinhard Zumkeller, Oct 08 2011
-
Mathematica
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countOdd[lst_] := Length[Select[lst, OddQ]]; Select[Range[1000], countOdd[Collatz[#]] == 9 &] (* T. D. Noe, Dec 03 2012 *)
-
Python
def a(n): l=[n, ] while True: if n%2==0: n//=2 else: n = 3*n + 1 if n not in l: l+=[n, ] if n<2: break else: break return len([i for i in l if i%2]) [n for n in range(30, 1101) if a(n)==9] # Indranil Ghosh, Apr 14 2017
Comments