The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A324346 Lexicographically earliest positive sequence such that a(i) = a(j) => A005811(i) = A005811(j) and A324055(i) = A324055(j), for all i, j >= 0. 4
1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, 22, 2, 27, 28, 29, 5, 30, 19, 18, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 2, 55, 56, 18, 15, 57, 19, 58, 59, 60, 61, 62, 63, 64, 65, 32, 66, 67, 68, 69, 63, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A005811(n), A324055(n)].
LINKS
FORMULA
For all n >= 1, a((2^n)-1) = 2.
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
A324055(n) = { my(m1=2, m2=1, p=2, mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4), mp *= p, m2 *= (mp-1)/(p-1))); n>>=1); (m1-m2); };
Aux324346(n) = [A005811(n), A324055(n)];
v324346 = rgs_transform(vector(1+up_to, n, Aux324346(n-1)));
A324346(n) = v324346[1+n];
CROSSREFS
Sequence in context: A323897 A324530 A324347 * A323904 A325810 A324400
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 24 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 2 10:31 EDT 2024. Contains 373038 sequences. (Running on oeis4.)