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-4 of 4 results.

A336994 Entries of A336938 without duplicates.

Original entry on oeis.org

0, 4, 16, 52, 160, 9232, 13120, 39364, 41524, 250504, 1276936, 6810136, 8153620, 27114424, 50143264, 106358020, 121012864, 593279152, 1570824736, 2482111348, 2798323360, 17202377752
Offset: 1

Views

Author

Markus Sigg, Aug 10 2020

Keywords

Comments

Is this (apart from the first 2 entries) the same as A006885? - R. J. Mathar, Aug 16 2020

Crossrefs

Cf. A336938.

Programs

  • 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([0]), i); for(i = 1, m, if (length(v) == 0 || v[length(v)] != A[#A], v = concat(v, A[#A])); if (i < m, A = iter(A))); v; };
    makeVec(10000)

Extensions

a(16)-a(22) from Jinyuan Wang, Aug 13 2020

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

A336256 The cardinalities of the sets A(n), where A(0) is the empty set and A(n+1) is the union of A(n) and the Collatz orbit of the smallest natural number missing in A(n).

Original entry on oeis.org

0, 1, 4, 9, 10, 20, 23, 24, 33, 34, 39, 42, 43, 46, 141, 142, 145, 146, 149, 161, 162, 170, 173, 174, 179, 180, 187, 190, 191, 204, 205, 208, 209, 212, 220, 221, 230, 231, 232, 239, 240, 243, 244, 247, 252, 253, 256, 257, 260, 261, 262, 267, 270, 271, 284, 285
Offset: 0

Views

Author

Markus Sigg, Aug 08 2020

Keywords

Crossrefs

Programs

  • 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, #A); if (i < m, A = iter(A))); v; };
    makeVec(56)

A336992 The number of gaps in the sets A(n), where A(0) is the empty set and A(n+1) is the union of A(n) and the Collatz orbit of the smallest natural number missing in A(n).

Original entry on oeis.org

0, 0, 1, 3, 3, 9, 9, 8, 12, 12, 14, 15, 15, 16, 100, 99, 100, 100, 101, 108, 108, 112, 111, 110, 110, 110, 110, 111, 110, 116, 115, 115, 115, 116, 120, 120, 124, 123, 122, 122, 121, 122, 122, 123, 125, 124, 125, 125, 126, 125, 125, 127, 127, 126, 133, 133
Offset: 0

Views

Author

Markus Sigg, Aug 10 2020

Keywords

Comments

The number of gaps would be relevant for sparse representations of the sets A(n), which may be of use for a numerical verification of the Collatz conjecture up to a given number.

Crossrefs

Programs

  • 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; };
    nGaps(A) = { my(i,c=0); for (i=2, #A, if (A[i-1] < A[i]-1, c = c+1;)); c; };
    makeVec(m) = { my(v = [], A = Set([]), i); for(i = 1, m, v = concat(v, nGaps(A)); if (i < m, A = iter(A))); v; };
    makeVec(57)
Showing 1-4 of 4 results.