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.

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).

This page as a plain text file.
%I A336256 #42 Aug 10 2020 13:18:46
%S A336256 0,1,4,9,10,20,23,24,33,34,39,42,43,46,141,142,145,146,149,161,162,
%T A336256 170,173,174,179,180,187,190,191,204,205,208,209,212,220,221,230,231,
%U A336256 232,239,240,243,244,247,252,253,256,257,260,261,262,267,270,271,284,285
%N 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).
%o A336256 (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 A336256 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 A336256 makeVec(m) = { my(v = [], A = Set([]), i); for(i = 1, m, v = concat(v, #A); if (i < m, A = iter(A))); v; };
%o A336256 makeVec(56)
%Y A336256 Cf. A061641, A336938.
%K A336256 nonn
%O A336256 0,3
%A A336256 _Markus Sigg_, Aug 08 2020