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 A336992 #13 Aug 10 2020 14:33:31 %S A336992 0,0,1,3,3,9,9,8,12,12,14,15,15,16,100,99,100,100,101,108,108,112,111, %T A336992 110,110,110,110,111,110,116,115,115,115,116,120,120,124,123,122,122, %U A336992 121,122,122,123,125,124,125,125,126,125,125,127,127,126,133,133 %N 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). %C A336992 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. %H A336992 Markus Sigg, <a href="/A336992/b336992.txt">Table of n, a(n) for n = 0..999</a> %o A336992 (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))); }; %o A336992 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; }; %o A336992 nGaps(A) = { my(i,c=0); for (i=2, #A, if (A[i-1] < A[i]-1, c = c+1;)); c; }; %o A336992 makeVec(m) = { my(v = [], A = Set([]), i); for(i = 1, m, v = concat(v, nGaps(A)); if (i < m, A = iter(A))); v; }; %o A336992 makeVec(57) %Y A336992 Cf. A061641, A336938. %K A336992 nonn %O A336992 0,4 %A A336992 _Markus Sigg_, Aug 10 2020