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 A373593 #8 Jun 13 2024 10:50:58 %S A373593 1,2,3,4,5,6,7,8,9,10,5,11,7,12,6,13,5,14,7,15,16,10,5,17,4,12,18,19, %T A373593 5,20,7,21,6,10,12,22,7,12,16,23,5,24,7,15,14,10,5,25,26,15,6,19,5,27, %U A373593 10,28,16,10,5,29,7,12,30,31,12,20,7,15,6,32,5,33,7,12,11,19,12,24,7,34,35,10,5,36,10,12,6,23,5,37,38,15,16,10,12,39,7,40,14,41 %N A373593 Lexicographically earliest infinite sequence such that for all i, j >= 1, a(i) = a(j) => f(i) = f(j), where f(n<=3) = n, f(p) = 0 for primes p > 3, and for composite n, f(n) = [A007949(n), A046523(A248909(n)), A046523(A343430(n))]. %C A373593 Restricted growth sequence transform of the function f given in the definition. %C A373593 For all i, j >= 1: %C A373593 a(i) = a(j) => A373595(i) = A373595(j), %C A373593 a(i) = a(j) => A353815(i) = A353815(j), %C A373593 a(i) = a(j) => A353816(i) = A353816(j). %H A373593 Antti Karttunen, <a href="/A373593/b373593.txt">Table of n, a(n) for n = 1..100000</a> %o A373593 (PARI) %o A373593 up_to = 100000; %o A373593 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 A373593 A007949(n) = valuation(n,3); %o A373593 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; %o A373593 A248909(n) = { my(f=factor(n)); for(k=1, #f~, if(1!=(f[k,1]%3), f[k,1]=1)); factorback(f); }; %o A373593 A343430(n) = { my(f=factor(n)); for(k=1, #f~, if(2!=(f[k,1]%3), f[k,1]=1)); factorback(f); }; %o A373593 Aux373593(n) = if(n<3, n, [A007949(n), A046523(A248909(n)), A046523(A343430(n))]); %o A373593 v373593 = rgs_transform(vector(up_to, n, Aux373593(n))); %o A373593 A373593(n) = v373593[n]; %Y A373593 Cf. A007949, A046523, A248909, A343430. %Y A373593 Cf. A353815, A353816, A373595. %K A373593 nonn %O A373593 1,2 %A A373593 _Antti Karttunen_, Jun 13 2024