cp's OEIS Frontend

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.

A323889 Lexicographically earliest positive sequence such that a(i) = a(j) => A002487(i) = A002487(j) and A278222(i) = A278222(j), for all i, j >= 0.

This page as a plain text file.
%I A323889 #18 Mar 15 2019 12:33:57
%S A323889 1,2,2,3,2,4,3,5,2,6,4,7,3,7,5,8,2,9,6,10,4,11,7,12,3,10,7,13,5,12,8,
%T A323889 14,2,15,9,16,6,17,10,18,4,17,11,19,7,20,12,21,3,16,10,22,7,19,13,23,
%U A323889 5,18,12,23,8,21,14,24,2,25,15,26,9,27,16,28,6,29,17,30,10,31,18,32,4,27,17,33,11,34,19,35,7,31,20,36,12,37,21,38,3,26,16,39,10,33,22
%N A323889 Lexicographically earliest positive sequence such that a(i) = a(j) => A002487(i) = A002487(j) and A278222(i) = A278222(j), for all i, j >= 0.
%C A323889 Restricted growth sequence transform of the ordered pair [A002487(n), A278222(n)].
%H A323889 Antti Karttunen, <a href="/A323889/b323889.txt">Table of n, a(n) for n = 0..65537</a>
%H A323889 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%H A323889 <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>
%F A323889 a(2^n) = 2 for all n >= 0.
%o A323889 (PARI)
%o A323889 up_to = 65537;
%o A323889 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 A323889 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
%o A323889 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
%o A323889 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
%o A323889 A278222(n) = A046523(A005940(1+n));
%o A323889 Aux323889(n) = [A002487(n), A278222(n)];
%o A323889 v323889 = rgs_transform(vector(1+up_to,n,Aux323889(n-1)));
%o A323889 A323889(n) = v323889[1+n];
%Y A323889 Cf. A002487, A278222, A286622, A324400.
%Y A323889 Cf. also A103391, A278243, A286378, A318311, A323892, A323897 and A324533 for a "deformed variant".
%K A323889 nonn,look
%O A323889 0,2
%A A323889 _Antti Karttunen_, Feb 09 2019