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 A327162 #5 Sep 05 2019 20:49:04 %S A327162 1,2,2,2,2,3,2,2,2,4,2,4,2,5,6,2,2,7,2,5,8,9,2,7,2,10,2,7,2,11,2,2,12, %T A327162 13,14,9,2,15,16,9,2,17,2,10,12,18,2,13,2,19,20,21,2,22,16,10,23,24,2, %U A327162 25,2,26,16,2,27,28,2,15,29,30,2,21,2,31,32,33,27,34,2,15,2,35,2,36,23,37,38,13,2,39,20,19,40,41,42,43,2,44,20,45,2,46,2,15 %N A327162 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A034460(n) * (-1)^[A327159(n)>0], and A034460(n) = usigma(n)-n, with usigma the sum of unitary divisors of n (A034448). %C A327162 For all i, j: %C A327162 A305800(i) = A305800(j) => a(i) = a(j) => A318882(i) = A318882(j). %H A327162 Antti Karttunen, <a href="/A327162/b327162.txt">Table of n, a(n) for n = 1..87360</a> %o A327162 (PARI) %o A327162 up_to = 87360; %o A327162 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 A327162 A034460(n) = (sumdivmult(n, d, if(gcd(d, n/d)==1, d))-n); \\ From A034460 %o A327162 A327159(n,orgn=n,xs=Set([])) = if(1==n,0,if(vecsearch(xs,n), if(n==orgn,length(xs),0), xs = setunion([n],xs); A327159(A034460(n),orgn,xs))); %o A327162 Aux327162(n) = A034460(n)*((-1)^((A327159(n)>0))); %o A327162 v327162 = rgs_transform(vector(up_to, n, Aux327162(n))); %o A327162 A327162(n) = v327162[n]; %Y A327162 Cf. A034448, A034460, A305800, A318882, A327159, %K A327162 nonn %O A327162 1,2 %A A327162 _Antti Karttunen_, Aug 28 2019