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 A364604 #15 Aug 10 2023 07:11:43 %S A364604 1,2,1,2,3,1,2,3,4,5,1,2,3,4,5,6,4,3,5,1,2,4,6,5,7,6,3,7,8,9,4,6,5,7, %T A364604 8,9,1,2,7,8,6,9,10,3,8,10,9,4,7,5,10,11,12,8,11,9,10,6,11,12,13,14, %U A364604 12,11,13,7,10,12,13,1,2,8,9,11,13,14,3,12,14,15,4,15,5,10,13,14,15,16 %N A364604 Lexicographically earliest sequence, where after every appearance, a term is banned from re-appearing for twice as long as last time; first appearance bans it for 1 term. %e A364604 a(n) ban 1 2 3 4 5 6 ... %e A364604 1 | | | | | | %e A364604 2 x | | | | | %e A364604 1 | x | | | | %e A364604 2 x | | | | | %e A364604 3 x x | | | | %e A364604 1 | x x | | | %e A364604 2 x | | | | | %e A364604 3 x x | | | | %e A364604 4 x x x | | | %e A364604 5 x x x x | | %e A364604 1 | x | | x | %e A364604 2 x | | | | | %e A364604 3 x x | | | | %e A364604 4 x x x | | | %e A364604 5 x x x x | | %e A364604 6 x x x x x | %e A364604 4 x x x | x x %e A364604 3 x x | x | | %e A364604 5 x x x x | | %e A364604 1 | x x x x | %e A364604 . %e A364604 . %e A364604 . %o A364604 (PARI) A364604(N) = {my(a=vector(N),z=1); for(s=1,N, if(a[s],next); my(m=-1); for(i=s,N, if(!a[i], a[i]=z; i+=(1<<(m++)))); z++); a} %o A364604 (Python) %o A364604 def A364604(N): %o A364604 a = [0]*N; z=s=0 %o A364604 while(s<N): %o A364604 z+=1; m=0; i=s %o A364604 while(i<N): %o A364604 if not a[i]: %o A364604 a[i]=z; i+=2**m; m+=1 %o A364604 i+=1 %o A364604 s+=1 %o A364604 return a %Y A364604 Cf. A364603, A364448, A364449. %K A364604 nonn %O A364604 1,2 %A A364604 _Rok Cestnik_, Jul 29 2023