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 A331745 #9 Feb 04 2020 21:44:31 %S A331745 1,2,2,3,2,4,3,5,2,6,4,7,3,8,5,9,2,10,6,11,4,12,7,13,3,14,8,15,5,16,9, %T A331745 17,2,18,10,19,6,20,11,21,4,22,12,23,7,24,13,25,3,26,14,27,8,28,15,29, %U A331745 5,30,16,31,9,32,17,33,2,34,18,35,10,36,19,37,6,38,20,39,11,24,21,40,4,41,22,42,12,43,23,44,7,45,24,46,13,47,25,48,3,49,26,50,14,51,27,52,8,45 %N A331745 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A323901(i) = A323901(j) for all i, j. %C A331745 Restricted growth sequence transform of the ordered pair [A278222(n), A323901(n)]. %H A331745 Antti Karttunen, <a href="/A331745/b331745.txt">Table of n, a(n) for n = 0..65537</a> %H A331745 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A331745 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a> %F A331745 a(2^n) = 2 for all n >= 0. %o A331745 (PARI) %o A331745 \\ Needs also code from A323901. %o A331745 up_to = 65537; %o A331745 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 A331745 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); %o A331745 t }; %o A331745 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523 %o A331745 A278222(n) = A046523(A005940(1+n)); %o A331745 Aux331745(n) = [A278222(n),A323901(n)]; %o A331745 v331745 = rgs_transform(vector(1+up_to, n, Aux331745(n-1))); %o A331745 A331745(n) = v331745[1+n]; %Y A331745 Cf. A278222, A323901. %Y A331745 Cf. also A324400, A286622, A318310, A324389, A331744, A331746. %K A331745 nonn %O A331745 0,2 %A A331745 _Antti Karttunen_, Feb 04 2020