A061641 Pure numbers in the Collatz (3x+1) iteration. Also called pure hailstone numbers.
0, 1, 3, 6, 7, 9, 12, 15, 18, 19, 21, 24, 25, 27, 30, 33, 36, 37, 39, 42, 43, 45, 48, 51, 54, 55, 57, 60, 63, 66, 69, 72, 73, 75, 78, 79, 81, 84, 87, 90, 93, 96, 97, 99, 102, 105, 108, 109, 111, 114, 115, 117, 120, 123, 126, 127, 129, 132, 133, 135, 138, 141, 144, 145
Offset: 1
Examples
Consider n=3: C(n), C_2(n), C_3(n), ...; the iterates are 10, 5, 16, 8, 4, 2, 1, 4, 2, 1; where 4, 5, 8, 10 and 16 have appeared in the orbit of 3 and are thus impure. a(1)=1 since Im(f(k,0))={0} for all k and so 1 is not a value of f(k,0). a(2)=3 since Im(f(k,0)) union Im(f(k,1))={0,1,2,4} and 3 is the smallest positive integer not contained in this set.
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
- Douglas J. Shaw, The Pure Numbers Generated by the Collatz Sequence, The Fibonacci Quarterly, Vol. 44, Number 3, August 2006, pp. 194-201.
- B. Snapp and M. Tracy, The Collatz Problem and analogues, JIS 11 (2008) 08.4.7.
- Index entries for sequences related to 3x+1 (or Collatz) problem
Programs
-
Mathematica
DoCollatz[n_] := Module[{m = n}, While[m > nn || ! reached[[m]], If[m <= nn, reached[[m]] = True]; If[EvenQ[m], m = m/2, m = 3 m + 1]]]; nn = 200; reached = Table[False, {nn}]; t = {0, 1}; While[DoCollatz[t[[-1]]]; pos = Position[reached, False, 1, 1]; pos != {}, AppendTo[t, pos[[1, 1]]]]; t (* T. D. Noe, Jan 22 2013 *)
-
PARI
firstMiss(A) = { my(i); if(#A == 0 || A[1] > 0, return(0)); for(i = 1, A[#A] + 1, if(!setsearch(A,i), return(i))); }; iter(A) = { my(a = firstMiss(A)); while(!setsearch(A,a), A = setunion(A, Set([a])); a = if(a % 2, 3*a+1, a/2)); A; }; makeVec(m) = { my(v = [], A = Set([]), i); for(i = 1, m, v = concat(v, firstMiss(A)); if (i < m, A = iter(A))); v; }; makeVec(64) \\ Markus Sigg, Aug 08 2020
Extensions
Edited by T. D. Noe and N. J. A. Sloane, Oct 16 2007
Comments