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 A323078 #6 Jan 04 2019 09:05:09 %S A323078 1,2,3,4,3,5,3,5,6,7,3,8,3,9,10,8,3,7,3,10,11,12,3,13,14,15,10,11,3, %T A323078 16,3,13,17,18,19,10,3,20,21,16,3,22,3,17,23,24,3,25,26,9,27,21,3,16, %U A323078 28,22,29,30,3,31,3,32,19,25,33,34,3,27,35,36,3,16,3,37,11,29,38,39,3,31,23,40,3,41,42,43,44,34,3,45,46,35,47,48,49,50,3,12,28,11,3,51,3,39,52 %N A323078 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is an odd prime, and f(n) = A097246(n) for all other numbers. %C A323078 For all i, j: a(i) = a(j) => A322869(i) = A322869(j). %H A323078 Antti Karttunen, <a href="/A323078/b323078.txt">Table of n, a(n) for n = 1..65537</a> %o A323078 (PARI) %o A323078 up_to = 65537; %o A323078 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 A323078 A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); }; %o A323078 A323078aux(n) = if((n>2)&&isprime(n),0,A097246(n)); %o A323078 v323078 = rgs_transform(vector(up_to,n,A323078aux(n))); %o A323078 A323078(n) = v323078[n]; %Y A323078 Cf. A097246, A305801, A322808, A322869. %K A323078 nonn %O A323078 1,2 %A A323078 _Antti Karttunen_, Jan 03 2019