login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A324345
Lexicographically earliest positive sequence such that a(i) = a(j) => A005811(i) = A005811(j) and A278222(i) = A278222(j), for all i, j >= 0.
4
1, 2, 3, 4, 3, 5, 6, 7, 3, 5, 8, 9, 6, 9, 10, 11, 3, 5, 8, 9, 8, 12, 13, 14, 6, 9, 13, 15, 10, 14, 16, 17, 3, 5, 8, 9, 8, 12, 13, 14, 8, 12, 18, 19, 13, 19, 20, 21, 6, 9, 13, 15, 13, 19, 22, 23, 10, 14, 20, 23, 16, 21, 24, 25, 3, 5, 8, 9, 8, 12, 13, 14, 8, 12, 18, 19, 13, 19, 20, 21, 8, 12, 18, 19, 18, 26, 27, 28, 13, 19, 27, 29, 20, 28, 30, 31, 6, 9, 13, 15, 13, 19
OFFSET
0,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A005811(n), A278222(n)], or equally, of [A005811(n), A286622(n)].
For all i, j >= 1:
a(i) = a(j) => A033264(i) = A033264(j).
FORMULA
a(2^n) = 3 for all n >= 1.
PROG
(PARI)
up_to = 65537;
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; };
A005811(n) = hammingweight(bitxor(n, n>>1)); \\ From A005811
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
Aux324345(n) = [A005811(n), A278222(n)];
v324345 = rgs_transform(vector(1+up_to, n, Aux324345(n-1)));
A324345(n) = v324345[1+n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 24 2019
STATUS
approved