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 A366877 #6 Oct 26 2023 17:22:35 %S A366877 1,1,2,1,3,1,4,1,5,3,2,1,6,2,7,1,8,5,9,3,3,1,4,1,10,6,11,1,12,4,13,1, %T A366877 14,8,15,5,16,5,17,3,5,3,2,1,6,2,7,1,18,10,19,6,20,3,4,1,21,12,22,2, %U A366877 23,7,24,1,25,14,26,8,27,8,28,5,29,16,15,5,30,9,31,3,8,5,9,3,3,1,4,1,10,6,11,1,12,4,13,1,32,18 %N A366877 Lexicographically earliest infinite sequence such that a(i) = a(j) => A337377(i) = A337377(j) for all i, j >= 0, where A337377 is the primorial deflation (denominator) of Doudna sequence. %C A366877 Restricted growth sequence transform of A337377. %H A366877 Antti Karttunen, <a href="/A366877/b366877.txt">Table of n, a(n) for n = 0..65537</a> %H A366877 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %o A366877 (PARI) %o A366877 up_to = 65537; %o A366877 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 A366877 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A366877 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A366877 A319627(n) = (A064989(n) / gcd(n, A064989(n))); %o A366877 A337377(n) = A319627(A005940(1+n)); %o A366877 v366877 = rgs_transform(vector(1+up_to,n,A337377(n-1))); %o A366877 A366877(n) = v366877[1+n]; %Y A366877 Cf. A005940, A064989, A319627, A337377. %Y A366877 Cf. also A366876. %K A366877 nonn %O A366877 0,3 %A A366877 _Antti Karttunen_, Oct 26 2023