login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
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.
LINKS
PROG
(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)
CROSSREFS
Sequence in context: A201456 A372267 A347033 * A349673 A064235 A098355
KEYWORD
nonn
AUTHOR
Markus Sigg, Aug 10 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 12:50 EDT 2024. Contains 372170 sequences. (Running on oeis4.)