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 A366262 #11 Oct 06 2023 10:52:27 %S A366262 1,2,3,2,3,2,4,5,6,2,4,7,4,5,3,7,8,2,4,7,4,7,4,9,8,10,3,7,11,7,6,5,6, %T A366262 2,4,7,4,7,4,9,8,12,4,9,13,9,8,7,13,12,3,7,11,7,11,7,13,14,15,5,8,14, %U A366262 8,10,15,2,4,7,4,7,4,9,8,12,4,9,13,9,8,7,13,16,4,9,13,9,13,9,17,16,18,7,13,19,13,12,8,10 %N A366262 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366261(i) = A366261(j) for all i, j >= 0. %C A366262 Restricted growth sequence transform of A366261. %C A366262 For all i, j >= 0: a(i) = a(j) => A366254(i) = A366254(j). %H A366262 Antti Karttunen, <a href="/A366262/b366262.txt">Table of n, a(n) for n = 0..65537</a> %o A366262 (PARI) %o A366262 up_to = 65537; %o A366262 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; }; %o A366262 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; %o A366262 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; %o A366262 A209229(n) = (n && !bitand(n,n-1)); %o A366262 A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; %o A366262 A303767(n) = if(!n,n,if(A209229(n),n+A303767(n-1),A053644(n)+A303767(n-A053644(n)-1))); %o A366262 A366260(n) = A005940(1+A303767(n)); %o A366262 A366261(n) = A046523(A366260(n)); %o A366262 v366262 = rgs_transform(vector(1+up_to,n,A366261(n-1))); %o A366262 A366262(n) = v366262[1+n]; %Y A366262 Cf. A366254, A366260, A366261. %Y A366262 Cf. also A286602, A286619, A286622. %K A366262 nonn %O A366262 0,2 %A A366262 _Antti Karttunen_, Oct 05 2023