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 A324399 #6 Mar 04 2019 23:09:54 %S A324399 1,2,3,4,3,5,3,4,6,7,3,5,3,8,9,4,3,6,3,7,10,11,3,5,12,13,14,8,3,9,3,4, %T A324399 15,16,17,6,3,18,19,7,3,10,3,11,20,21,3,5,22,12,23,13,3,14,24,8,25,26, %U A324399 3,9,3,27,28,4,29,15,3,16,30,17,3,6,3,31,32,18,33,19,3,7,34,35,3,10,36,37,38,11,3,20,39,21,40,41,42,5,3,22,43,12,3,23,3,13,44 %N A324399 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = A000265(n) for all other numbers, except that f(n) = 0 if n is an odd prime, and f(1) = -1 and f(2) = -2. %C A324399 For all i, j: %C A324399 A324401(i) = A324401(j) => a(i) = a(j). %H A324399 Antti Karttunen, <a href="/A324399/b324399.txt">Table of n, a(n) for n = 1..65537</a> %o A324399 (PARI) %o A324399 up_to = 65537; %o A324399 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 A324399 A000265(n) = (n/2^valuation(n, 2)); %o A324399 Aux324399(n) = if(n<3,-n,if(isprime(n),0,A000265(n))); %o A324399 v324399 = rgs_transform(vector(up_to, n, Aux324399(n))); %o A324399 A324399(n) = v324399[n]; %Y A324399 Cf. A000040, A000265, A003602, A322809, A324401. %K A324399 nonn %O A324399 1,2 %A A324399 _Antti Karttunen_, Mar 01 2019