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 A351040 #25 Nov 23 2023 15:13:29 %S A351040 1,1,2,1,3,2,4,1,5,3,6,2,7,4,8,1,9,5,10,3,11,6,12,2,13,7,14,4,15,8,16, %T A351040 1,17,9,17,5,18,10,19,3,20,11,21,6,22,12,23,2,24,13,25,7,26,14,25,4, %U A351040 27,15,28,8,29,16,30,1,31,17,32,9,33,17,34,5,35,18,36,10,33,19,37,3,38,20,39,11,40,21,41,6,42 %N A351040 Lexicographically earliest infinite sequence such that a(i) = a(j) => A336158(i) = A336158(j), A206787(i) = A206787(j) and A336651(i) = A336651(j) for all i, j >= 1. %C A351040 Restricted growth sequence transform of the ordered triplet [A336158(n), A206787(n), A336651(n)]. %C A351040 For all i, j >= 1: %C A351040 A003602(i) = A003602(j) => a(i) = a(j), %C A351040 a(i) = a(j) => A336390(i) = A336390(j) => A336391(i) = A336391(j), %C A351040 a(i) = a(j) => A347374(i) = A347374(j), %C A351040 a(i) = a(j) => A351036(i) = A351036(j) => A113415(i) = A113415(j), %C A351040 a(i) = a(j) => A351461(i) = A351461(j). %C A351040 From _Antti Karttunen_, Nov 23 2023: (Start) %C A351040 Conjectured to be equal to the lexicographically earliest infinite sequence such that b(i) = b(j) => A000593(i) = A000593(j), A336158(i) = A336158(j) and A336467(i) = A336467(j), for all i, j >= 1 (this was the original definition). In any case it holds that a(i) = a(j) => b(i) = b(j) for all i, j >= 1. See comment in A351461. %C A351040 (End) %H A351040 Antti Karttunen, <a href="/A351040/b351040.txt">Table of n, a(n) for n = 1..65539</a> %o A351040 (PARI) %o A351040 up_to = 65539; %o A351040 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 A351040 A000265(n) = (n>>valuation(n,2)); %o A351040 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; %o A351040 A336158(n) = A046523(A000265(n)); %o A351040 A206787(n) = sumdiv(n, d, d*(d % 2)*issquarefree(d)); %o A351040 A336651(n) = { my(f=factor(n)); prod(i=1, #f~, if(2==f[i,1],1,f[i,1]^(f[i,2]-1))); }; %o A351040 Aux351040(n) = [A336158(n), A206787(n), A336651(n)]; %o A351040 v351040 = rgs_transform(vector(up_to, n, Aux351040(n))); %o A351040 A351040(n) = v351040[n]; %Y A351040 Cf. A000265, A000593, A336158, A336467. %Y A351040 Cf. also A003602, A336390, A336391, A351037, A366891. %Y A351040 Differs from A347374 for the first time at n=103, where a(103) = 48, while A347374(103) = 30. %Y A351040 Differs from A351035 for the first time at n=175, where a(175) = 80, while A351035(175) = 78. %Y A351040 Differs from A351036 for the first time at n=637, where a(637) = 272, while A351036(637) = 261. %K A351040 nonn,easy %O A351040 1,3 %A A351040 _Antti Karttunen_, Jan 31 2022 %E A351040 Original definition moved to the comment section and replaced with a definition that is at least as encompassing, and conjectured to be equal to the original one. - _Antti Karttunen_, Nov 23 2023