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 A336474 #7 Jul 25 2020 10:37:20 %S A336474 1,2,3,2,4,5,6,2,7,8,9,5,10,11,12,2,13,14,15,8,16,17,18,5,19,20,21,11, %T A336474 22,23,24,2,25,26,27,14,28,29,30,8,31,32,33,17,34,35,36,5,37,12,38,20, %U A336474 39,40,25,11,41,42,43,23,44,45,46,2,47,48,49,26,50,32,51,14,52,53,34,29,54,55,56,8,57,58,59,32,60,61,62,17,63,64,65,35,66,67,68,5,69,70,71,12,72,73,74,20,75 %N A336474 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278221(i) = A278221(j) and A329697(i) = A329697(j), for all i, j >= 1. %C A336474 Restricted growth sequence transform of the ordered pair [A278221(n), A329697(n)]. %C A336474 For all i, j: A324400(i) = A324400(j) => A336146(i) = A336146(j) => a(i) = a(j). %H A336474 Antti Karttunen, <a href="/A336474/b336474.txt">Table of n, a(n) for n = 1..65537</a> %o A336474 (PARI) %o A336474 up_to = 65537; %o A336474 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 A336474 A122111(n) = if(1==n,n,my(f=factor(n), es=Vecrev(f[,2]),is=concat(apply(primepi,Vecrev(f[,1])),[0]),pri=0,m=1); for(i=1, #es, pri += es[i]; m *= prime(pri)^(is[i]-is[1+i])); (m)); %o A336474 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523 %o A336474 A278221(n) = A046523(A122111(n)); %o A336474 A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1])))); %o A336474 Aux336474(n) = [A278221(n), A329697(n)]; %o A336474 v336474 = rgs_transform(vector(up_to,n,Aux336474(n))); %o A336474 A336474(n) = v336474[n]; %Y A336474 Cf. A046523, A122111, A278221, A329697. %Y A336474 Cf. also A324400, A336146, A336473. %K A336474 nonn %O A336474 1,2 %A A336474 _Antti Karttunen_, Jul 25 2020