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 A366876 #8 Oct 26 2023 17:22:31 %S A366876 1,2,3,4,5,3,6,7,8,9,5,10,11,6,12,13,14,15,16,17,8,5,18,19,20,21,11,6, %T A366876 22,12,23,24,25,26,27,28,29,16,30,31,14,15,8,9,32,18,33,34,35,36,37, %U A366876 38,20,11,11,39,40,41,22,12,42,23,43,44,45,46,47,48,49,27,50,51,52,53,29,54,55,30,56,57,25,26,27,28,14 %N A366876 Lexicographically earliest infinite sequence such that a(i) = a(j) => A337376(i) = A337376(j) for all i, j >= 0, where A337376 is the primorial deflation (numerator) of Doudna sequence. %C A366876 Restricted growth sequence transform of A337376. %H A366876 Antti Karttunen, <a href="/A366876/b366876.txt">Table of n, a(n) for n = 0..65537</a> %H A366876 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %o A366876 (PARI) %o A366876 up_to = 65537; %o A366876 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 A366876 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A366876 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 A366876 A319626(n) = (n / gcd(n, A064989(n))); %o A366876 A337376(n) = A319626(A005940(1+n)); %o A366876 v366876 = rgs_transform(vector(1+up_to,n,A337376(n-1))); %o A366876 A366876(n) = v366876[1+n]; %Y A366876 Cf. A005940, A064989, A319626, A337376. %Y A366876 Cf. also A366877. %K A366876 nonn %O A366876 0,2 %A A366876 _Antti Karttunen_, Oct 26 2023