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 A366791 #9 Oct 23 2023 18:05:46 %S A366791 1,1,2,1,3,2,4,1,5,3,6,2,5,4,7,1,8,5,9,3,10,6,11,2,12,5,13,4,11,7,14, %T A366791 1,15,8,16,5,17,9,13,3,18,10,8,6,14,11,19,2,10,12,20,5,21,13,22,4,5, %U A366791 11,20,7,6,14,11,1,19,15,23,8,24,16,6,5,16,17,25,9,12,13,24,3,26,18,19,10,15,8,26,6,8,14,16,11,27,19,6 %N A366791 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366388(j) = A366388(j) and A366788(i) = A366788(j), for all i, j >= 1. %C A366791 Restricted growth sequence transform of the ordered pair [A366388(n), A366788(n)]. %C A366791 For all i, j >= 1: A003602(i) = A003602(j) => a(i) = a(j). %H A366791 Antti Karttunen, <a href="/A366791/b366791.txt">Table of n, a(n) for n = 1..65537</a> %o A366791 (PARI) %o A366791 up_to = 65537; %o A366791 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 A366791 A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p)); %o A366791 A366388(n) = if(n<=2, 0, if(isprime(n), 1+A366388(primepi(n)), my(f=factor(n)); (apply(A366388, f[, 1])~ * f[, 2]))); %o A366791 Aux366791(n) = [A366388(n), A366388(A163511(n))]; %o A366791 v366791 = rgs_transform(vector(up_to, n, Aux366791(n))); %o A366791 A366791(n) = v366791[n]; %Y A366791 Cf. A003602, A366388, A366788. %Y A366791 Cf. also A334867, A365386, A365388 (compare the scatter plots). %K A366791 nonn,look %O A366791 1,3 %A A366791 _Antti Karttunen_, Oct 23 2023