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 A331174 #6 Jan 15 2020 18:40:01 %S A331174 1,2,3,4,3,5,3,6,7,8,3,8,3,9,10,11,3,10,3,12,13,14,3,9,15,16,15,17,3, %T A331174 18,3,19,20,21,22,13,3,23,24,17,3,25,3,26,27,28,3,14,29,27,30,31,3,22, %U A331174 32,33,34,35,3,25,3,36,37,38,39,40,3,41,42,43,3,20,3,44,45,46,47,48,3,26,29,49,3,50,51,52,53,54,3,43,55,56,57,58,59,16,3,60,61,37,3,62,3,63,64 %N A331174 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = min(n, A122111(n)), for all other n, except for odd primes p, f(p) = 0. %C A331174 Restricted growth sequence transform of function f(n) = 0 if n is an odd prime, otherwise f(n) = A331170(n). %C A331174 For all i, j: %C A331174 A305801(i) = A305801(j) => a(i) = a(j) => A001221(i) = A001221(j). %H A331174 Antti Karttunen, <a href="/A331174/b331174.txt">Table of n, a(n) for n = 1..65537</a> %o A331174 (PARI) %o A331174 up_to = 65537; %o A331174 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 A331174 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A331174 A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n))); %o A331174 Aux331174(n) = if((n%2)&&isprime(n),0,min(n, A122111(n))); %o A331174 v331174 = rgs_transform(vector(up_to, n, Aux331174(n))); %o A331174 A331174(n) = v331174[n]; %Y A331174 Cf. A001221, A064989, A122111, A305801, A331170. %K A331174 nonn %O A331174 1,2 %A A331174 _Antti Karttunen_, Jan 15 2020