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 A324818 #7 Mar 18 2019 21:49:04 %S A324818 1,2,2,2,2,3,2,2,4,5,2,6,2,5,7,8,2,9,2,5,8,10,2,11,12,5,13,14,2,3,2,2, %T A324818 7,5,13,2,2,5,4,15,2,3,2,6,7,5,2,6,16,2,7,5,2,3,2,17,4,5,2,11,2,10,13, %U A324818 2,13,18,2,5,7,5,2,9,2,5,13,6,19,3,2,5,4,5,2,14,16,20,21,22,2,23,24,6,13,10,25,26,2,2,7,8,2,18,2,5,21 %N A324818 Lexicographically earliest sequence such that a(i) = a(j) => A009194(i) = A009194(j) and A324396(i) = A324396(j) for all i, j. %C A324818 Restricted growth sequence transform of the ordered pair [A009194(n), A324396(n)], that is, of the ordered pair [A009194(n), A009194(A156552(n))]. %H A324818 Antti Karttunen, <a href="/A324818/b324818.txt">Table of n, a(n) for n = 1..10000</a> (based on Hans Havermann's factorization of A156552) %H A324818 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A324818 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %H A324818 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a> %o A324818 (PARI) %o A324818 up_to = 10000; %o A324818 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 A324818 A009194(n) = gcd(n, sigma(n)); %o A324818 A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552 %o A324818 A324396(n) = gcd(A156552(n),A323243(n)); \\ Needs code also from A323243 %o A324818 v324818 = rgs_transform(vector(up_to,n,[A009194(n), A324396(n)])); %o A324818 A324818(n) = v324818[n]; %Y A324818 Cf. A009194, A156552, A323243, A324396. %K A324818 nonn %O A324818 1,2 %A A324818 _Antti Karttunen_, Mar 17 2019