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 A336938 #20 Aug 10 2020 13:18:42 %S A336938 0,4,16,16,52,52,52,160,160,160,160,160,160,9232,9232,9232,9232,9232, %T A336938 9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232, %U A336938 9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232,9232 %N A336938 The maximum values of the sets A(n), where A(0) = {0} and A(n+1) is the union of A(n) and the Collatz orbit of the smallest natural number missing in A(n). %o A336938 (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 A336938 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 A336938 makeVec(m) = { my(v = [], A = Set([0]), i); for(i = 1, m, v = concat(v, A[#A]); if (i < m, A = iter(A))); v; }; %o A336938 makeVec(47) %Y A336938 Cf. A061641, A336256. %K A336938 nonn %O A336938 0,2 %A A336938 _Markus Sigg_, Aug 08 2020