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 A365431 #13 Sep 17 2023 12:10:10 %S A365431 1,1,1,1,1,1,2,1,3,1,4,1,5,2,2,1,6,3,7,1,8,4,9,1,10,5,5,2,11,2,12,1, %T A365431 13,6,14,3,15,7,7,1,16,8,17,4,18,9,19,1,20,10,10,5,21,5,9,2,22,11,23, %U A365431 2,24,12,25,1,26,13,27,6,28,14,29,3,30,15,6,7,5,7,31,1,32,16,33,8,16,17,17,4,34,18,35,9,36,19,12,1 %N A365431 Lexicographically earliest infinite sequence such that a(i) = a(j) => A364502(i) = A364502(j) for all i, j >= 1, where A364502(n) is the denominator of n / A005940(n). %C A365431 Restricted growth sequence transform of A364502, or equally, of A365432. %C A365431 For all i, j: A003602(i) = A003602(j) => a(i) = a(j). %C A365431 Compare to the scatter plots of A365393 and A365715. %H A365431 Antti Karttunen, <a href="/A365431/b365431.txt">Table of n, a(n) for n = 1..65537</a> %o A365431 (PARI) %o A365431 up_to = 65537; %o A365431 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 A365431 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; %o A365431 A364502(n) = { my(u=A005940(n)); (u / gcd(n, u)); }; %o A365431 v365431 = rgs_transform(vector(up_to,n,A364502(n))); %o A365431 A365431(n) = v365431[n]; %Y A365431 Cf. A005940, A364502, A365432. %Y A365431 Cf. also A365393, A365715 (analogous sequence for Doudna variant D(3)). %K A365431 nonn,look %O A365431 1,7 %A A365431 _Antti Karttunen_, Sep 07 2023