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.

Showing 1-5 of 5 results.

A061641 Pure numbers in the Collatz (3x+1) iteration. Also called pure hailstone numbers.

Original entry on oeis.org

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

Views

Author

Frederick Magata (frederick.magata(AT)uni-muenster.de), Jun 14 2001

Keywords

Comments

Let {f(k,N), k=0,1,2,...} denote the (3x+1)-sequence with starting value N; a(n) denotes the smallest positive integer which is not contained in the union of f(k,0),...,f(k,a(n-1)).
In other words, a(n) is the starting value of the next '3x+1'-sequences in the sense that a(n) is not a value in any sequence f(k,N) with N < a(n).
f(0,N)=N, f(k+1,N)=f(k,N)/2 if f(k,N) is even and f(k+1,N)=3*f(k,N)+1 if f(k,N) is odd.
For all n, a(n) mod 6 is 0, 1 or 3. I conjecture that a(n)/n -> C=constant for n->oo, where C=2.311...
The Collatz conjecture says that for all positive n, there exists k such that C_k(n) = 1. Shaw states [p. 195] that "A positive integer n is pure if its entire tree of preimages under the Collatz function C are greater than or equal to it; otherwise n is impure. Equivalently, a positive integer n is impure if there exists rGary W. Adamson, Jan 28 2007
Pure numbers remaining after deleting the impure numbers in the hailstone (Collatz) problem; where the operation C(n) = {3n+1, n odd; n/2, n even}. Add the 0 mod 3 terms in order, among the terms of A127633, since all 0 mod 3 numbers are pure. - Gary W. Adamson, Jan 28 2007
After computing all a(n) < 10^9, the ratio a(n)/n appears to be converging to 2.31303... Hence it appears that the numbers in this sequence have a density of about 1/3 (due to all multiples of 3) + 99/1000. - T. D. Noe, Oct 12 2007
A016945 is a subsequence. - Reinhard Zumkeller, Apr 17 2008

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.
		

Crossrefs

Cf. A070165 (Collatz trajectories), A127633, A336938, A336938. See A177729 for a variant.

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

A166245 Numbers n such that the Collatz trajectory of n (iterate T(k)=k/2 if k is even, (3k+1)/2 if k is odd, A014682, starting at n and stopping if you reach 1) never exceeds n.

Original entry on oeis.org

1, 2, 4, 8, 10, 12, 16, 20, 24, 26, 28, 32, 34, 36, 40, 42, 44, 48, 50, 52, 56, 58, 64, 66, 68, 72, 74, 76, 80, 84, 88, 90, 92, 96, 98, 100, 104, 106, 112, 114, 116, 120, 122, 128, 130, 132, 136, 138, 140, 144, 148, 152, 154, 156, 160, 162, 168, 170, 172, 176, 178, 180
Offset: 1

Views

Author

Michael Higgins (mikehiggins1981(AT)gmail.com), Oct 10 2009

Keywords

Comments

Let T(n)=n/2 if n is even, (3n+1)/2 if n is odd. This function is the same as the one in the Collatz conjecture, 3x+1 problem, Kakutani's Problem, Syracuse problem etc. Then x is an element of the sequence iff T^k(x) <= x for all k. Several conjectures relating to the 3x+1 problem can be restated in terms of this set. For example: There are no nontrivial cycles iff the <= can be replaced with < in the definition of the sequence for x>2. x has bounded trajectory iff T^k(x) is an element of the sequence for some k. These two statements together are equivalent to the Collatz conjecture.

Examples

			1 is a term, because the trajectory stops right there at 1.
2 is a term because the trajectory is 2->1.
3 is not a term because the trajectory is 3 -> 5 -> 8 -> 4 -> 2 -> 1, and 5>3.
		

Crossrefs

Programs

  • Mathematica
    L1 = {}; For[i = 1, i < 4096, i++, max = i; n = i; While[n != 1 || Element[n, L1] == False, If[Mod[n, 2] == 1, n = (3 n + 1)/2; If[max <= n, max = n], n = n/2; If[max <= n, max = n]]]; Sort[DeleteDuplicates[L1]]];
    ctenQ[n_]:=Max[NestWhileList[If[EvenQ[#],#/2,(3#+1)/2]&,n,#>1&]]<=n; Select[Range[200],ctenQ] (* Harvey P. Dale, Mar 17 2017 *)
  • PARI
    is(x)=my(X);X=x;while(x!=1,x=if(x%2,(3*x+1)/2,x/2);if(x>X,return(0)));1

Extensions

Edited by Ralf Stephan, Nov 26 2013
Definition clarified by N. J. A. Sloane, Mar 17 2017

A127928 Pure hailstone primes.

Original entry on oeis.org

3, 7, 19, 37, 43, 73, 79, 97, 109, 127, 151, 163, 181, 199, 223, 241, 271, 277, 307, 313, 331, 349, 367, 379, 397, 421, 439, 457, 487, 523, 541, 547, 601, 613, 619, 631, 673, 691, 709, 727, 757, 811, 829, 853, 883, 907, 937, 997, 1009, 1033, 1051, 1069, 1087, 1117
Offset: 1

Views

Author

Gary W. Adamson, Feb 07 2007

Keywords

Comments

In other words, pure hailstone numbers that are also primes (primes in A061641).
Impure hailstone numbers occur in the trajectories of smaller numbers, using the definition C(n) = (3n+1, n odd; n/2 if n is even). The set of pure hailstone numbers and the subset of pure, prime hailstone numbers; may be obtained through a process of elimination. The rules [cf. Shaw, p. 199] for A127928(n>1) force the terms to be == 1 or 7 mod 18; but not all primes mod 1 or 7 are in A127928. (e.g. 61 == 7 mod 18 and is prime but is not a pure hailstone number).
Shaw, p. 199: If n == 0, 3, 6, 9, 12 or 15 mod 18, then n is pure, but only 3 is prime. If n == 2, 4, 5, 8, 10, 11, 13, 14, 16 or 17 mod 18, then n is impure. If n == 1 or 7 mod 18, then n may be pure or impure.

Examples

			3 is a pure hailstone (Collatz) number since it does not appear in the orbit of 1 or 2, but 5 is impure since the iterative trajectory of 3 = (10, 5, 16, 8, 4, 2, 1).
		

Crossrefs

Extensions

More terms from Amiram Eldar, Feb 28 2020

A127930 Terms of A127928 that are prime in A006577.

Original entry on oeis.org

3, 43, 109, 163, 307, 439, 541, 619, 937, 1069, 1087, 1297, 1303, 1321, 1609, 1621, 1627, 1657, 1783, 1861, 2053, 2251, 2293, 2311, 2347, 2647, 2689, 3067, 3121, 3319, 3373, 3457, 3499, 3511, 3517, 3607, 3637, 3769, 4051, 4057, 4219, 4363, 4561, 4723, 4813, 4903
Offset: 1

Views

Author

Gary W. Adamson, Feb 07 2007

Keywords

Comments

Through a(9) the terms have the following number of 3x+1 problem steps: 7, 29, 113, 23, 37, 53, 43, 131, 173.

Examples

			3 is in the set A127930 since the iterative trajectory of 3 has 7 steps: (10, 5, 16, 8, 4, 2, 1) and 7 is prime.
		

Crossrefs

Formula

A127928 = numbers that are both pure hailstone (Collatz) and prime. A127930 = the subset having prime steps to reach 1; given the Collatz rule C(n) = {3n+1, n odd; n/2 if n is even}.

Extensions

More terms from Amiram Eldar, Feb 28 2020

A127929 a(n) = A127928(n) mod 18.

Original entry on oeis.org

3, 7, 1, 1, 7, 1, 7, 7, 1, 1, 7, 1, 1, 1, 7, 7, 1, 7, 1, 7, 7, 7, 7, 1, 1, 7, 7, 7, 1, 1, 1, 7, 7, 1, 7, 1, 7, 7, 7, 7, 1, 1, 1, 7, 1, 7, 1, 7, 1, 7, 7, 7, 7, 1, 7, 1, 7, 7, 7, 1, 1, 7, 7, 1, 7, 7, 1, 7, 1, 1, 7, 1, 7, 1, 1, 7, 1, 7, 1, 7, 1, 7, 7, 7, 7, 7, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 07 2007

Keywords

Comments

Aside from "3", all terms of A127928 must be 1 or 7 mod 18 (see A127928 for mod rules); but not all primes mod 1 or 7 are pure hailstone numbers. For example, the prime 61 == 7 mod 18 but 61 is impure. Conjecture: for large n, the numbers of 1 and 7 mod 18 terms are approximately equal.

Examples

			a(5) = 7 since A127928(5) = 43 and 43 == 7 mod 18.
		

Crossrefs

Formula

Pure hailstone (Collatz) numbers that are also prime (i.e. the set A127928), mod 18.

Extensions

More terms from Amiram Eldar, Feb 28 2020
Showing 1-5 of 5 results.