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 A373151 #8 May 27 2024 19:11:34 %S A373151 1,2,2,3,2,4,2,5,6,7,2,8,2,9,10,11,2,12,2,13,14,15,2,16,6,17,18,19,2, %T A373151 20,2,21,22,23,24,25,2,26,27,28,2,29,2,30,15,31,2,32,6,9,33,34,2,35, %U A373151 27,36,37,20,2,38,2,39,40,41,42,43,2,44,45,46,2,15,2,47,16,48,42,49,2,50,8,51,2,52,37,53,54,55,2,29,56,57,58,59,60,28,2,16,31,61 %N A373151 Lexicographically earliest infinite sequence such that a(i) = a(j) => A083345(i) = A083345(j) and A373145(i) = A373145(j), for all i, j >= 1. %C A373151 Restricted growth sequence transform of the ordered pair [A083345(n), A373145(n)]. %C A373151 For all i, j >= 1: %C A373151 A373150(i) = A373150(j) => a(i) = a(j), %C A373151 a(i) = a(j) => A369001(i) = A369001(j), %C A373151 a(i) = a(j) => A369004(i) = A369004(j), %C A373151 a(i) = a(j) => A373143(i) = A373143(j). %H A373151 Antti Karttunen, <a href="/A373151/b373151.txt">Table of n, a(n) for n = 1..65537</a> %o A373151 (PARI) %o A373151 up_to = 65537; %o A373151 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 A373151 A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1])); %o A373151 A083345(n) = { my(f=factor(n)); numerator(vecsum(vector(#f~, i, f[i, 2]/f[i, 1]))); }; %o A373151 A002110(n) = prod(i=1,n,prime(i)); %o A373151 A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*A002110(primepi(f[k, 1])-1)); }; %o A373151 A373145(n) = gcd(A003415(n), A276085(n)); %o A373151 Aux373151(n) = [A083345(n), A373145(n)]; %o A373151 v373151 = rgs_transform(vector(up_to, n, Aux373151(n))); %o A373151 A373151(n) = v373151[n]; %Y A373151 Cf. A003415, A002110, A083345, A276085, A373145. %Y A373151 Cf. A369001, A369004, A373143, A373150. %K A373151 nonn %O A373151 1,2 %A A373151 _Antti Karttunen_, May 27 2024