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.
%I A062059 #35 Feb 16 2025 08:32:44 %S A062059 33,65,66,67,130,131,132,133,134,260,261,262,264,266,268,269,273,289, %T A062059 520,522,524,525,528,529,532,533,536,538,546,547,555,571,577,578,579, %U A062059 583,633,635,1040,1044,1045,1048,1050,1056,1058,1059,1064,1066,1072,1076,1077 %N A062059 Numbers with 9 odd integers in their Collatz (or 3x+1) trajectory. %C A062059 The Collatz (or 3x+1) function is f(x) = x/2 if x is even, 3x+1 if x is odd. %C A062059 The Collatz trajectory of n is obtained by applying f repeatedly to n until 1 is reached. %C A062059 A078719(a(n)) = 9; A006667(a(n)) = 8. %D A062059 J. Shallit and D. Wilson, The "3x+1" Problem and Finite Automata, Bulletin of the EATCS #46 (1992) pp. 182-185. %H A062059 Reinhard Zumkeller, <a href="/A062059/b062059.txt">Table of n, a(n) for n = 1..10000</a> %H A062059 J. Shallit and D. Wilson, <a href="http://www.cs.uwaterloo.ca/~shallit/Papers/wilson.ps">The "3x+1" Problem and Finite Automata</a>, Bulletin of the EATCS #46 (1992) pp. 182-185. %H A062059 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a> %H A062059 Wikipedia, <a href="http://en.wikipedia.org/wiki/Collatz_conjecture">Collatz conjecture</a> %H A062059 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %H A062059 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>. %e A062059 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. %t A062059 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 *) %o A062059 (Haskell) %o A062059 import Data.List (elemIndices) %o A062059 a062059 n = a062059_list !! (n-1) %o A062059 a062059_list = map (+ 1) $ elemIndices 9 a078719_list %o A062059 -- _Reinhard Zumkeller_, Oct 08 2011 %o A062059 (Python) %o A062059 def a(n): %o A062059 l=[n, ] %o A062059 while True: %o A062059 if n%2==0: n//=2 %o A062059 else: n = 3*n + 1 %o A062059 if n not in l: %o A062059 l+=[n, ] %o A062059 if n<2: break %o A062059 else: break %o A062059 return len([i for i in l if i%2]) %o A062059 [n for n in range(30, 1101) if a(n)==9] # _Indranil Ghosh_, Apr 14 2017 %Y A062059 Cf. A062052, A062053, A062054, A062055, A062056, A062057, A062058, A062060. %Y A062059 Column k=9 of A354236. %K A062059 nonn %O A062059 1,1 %A A062059 _David W. Wilson_