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 A366376 #15 Oct 09 2023 15:50:08 %S A366376 1,2,2,1,2,3,1,1,2,4,3,5,1,6,1,1,2,7,4,8,3,9,5,10,1,11,6,12,1,13,1,1, %T A366376 2,7,7,8,4,14,8,15,3,16,9,17,5,18,10,19,1,20,11,21,6,22,12,23,1,13,13, %U A366376 24,1,25,1,26,2,27,7,28,7,29,8,30,4,31,14,12,8,32,15,33,3,5,16,34,9,22,17,35,5,36,18,19,10 %N A366376 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366375(i) = A366375(j) for all i, j >= 0, where A366375(n) is the denominator of n / A332214(n). %C A366376 Restricted growth sequence transform of A366375. %H A366376 Antti Karttunen, <a href="/A366376/b366376.txt">Table of n, a(n) for n = 0..65537</a> %o A366376 (PARI) %o A366376 \\ Needs also program from A332214: %o A366376 up_to = 65537; %o A366376 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 A366376 A366375(n) = { my(u=A332214(n)); (u/gcd(n,u)); }; %o A366376 v366376 = rgs_transform(vector(1+up_to,n,A366375(n-1))); %o A366376 A366376(n) = v366376[1+n]; %Y A366376 Cf. A332214, A366373, A366375. %Y A366376 Cf. also A365393, A365431, A366286 (compare the scatter plots). %K A366376 nonn,look %O A366376 0,2 %A A366376 _Antti Karttunen_, Oct 08 2023