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 A322591 #6 Dec 18 2018 17:04:47 %S A322591 1,2,3,2,3,4,3,2,5,6,3,4,3,7,8,2,3,4,3,6,9,10,3,4,11,12,5,7,3,13,3,2, %T A322591 14,15,16,4,3,17,18,6,3,19,3,10,8,20,3,4,21,6,22,12,3,4,23,7,24,25,3, %U A322591 13,3,26,9,2,27,28,3,15,29,30,3,4,3,31,8,17,32,33,3,6,5,34,3,19,35,36,37,10,3,13,38,20,39,40,41,4,3,7,14,6,3,42,3,12,43 %N A322591 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and A007947(n) for any other number. %C A322591 For all i, j: %C A322591 a(i) = a(j) => A066086(i) = A066086(j), %C A322591 a(i) = a(j) => A322354(i) = A322354(j). %H A322591 Antti Karttunen, <a href="/A322591/b322591.txt">Table of n, a(n) for n = 1..65537</a> %o A322591 (PARI) %o A322591 up_to = 65537; %o A322591 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 A322591 A007947(n) = factorback(factorint(n)[, 1]); %o A322591 Aux322591(n) = if((n>2)&&isprime(n),0,A007947(n)); %o A322591 v322591 = rgs_transform(vector(up_to, n, Aux322591(n))); %o A322591 A322591(n) = v322591[n]; %Y A322591 Cf. A007947, A305801, A322587, A322588, A322589, A322590, A322592. %K A322591 nonn %O A322591 1,2 %A A322591 _Antti Karttunen_, Dec 18 2018