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!)
A332210 Permutation of primes, inverse of A332211. 4
2, 3, 7, 5, 13, 19, 23, 29, 31, 37, 11, 43, 47, 53, 61, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 17, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Sequence is well-defined also in case there are only a finite number of Mersenne primes.
LINKS
FORMULA
For all applicable n >= 1, a(A059305(n)) = a(A000720(A000668(n))) = A000040(A000043(n)).
PROG
(PARI)
up_to = 127;
A332210list(up_to) = { my(lista=List([]), xs=Map(), i=1, q, u); for(n=1, up_to, if(!isprime(q=((2^n)-1)), while(mapisdefined(xs, prime(i)), i++); q = prime(i)); mapput(xs, q, n)); for(i=1, oo, if(!mapisdefined(xs, prime(i), &u), return(Vec(lista)), listput(lista, prime(u)))); };
\\ For computing a larger number of terms, use the precomputed values of A000043:
v000043 = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 42643801, 43112609];
A332210list(up_to) = { my(lista=List([]), xs=Map(), m000043 = Map(), i=1, q, u); for(k=1, #v000043, mapput(m000043, v000043[k], k)); for(n=1, min(up_to, v000043[#v000043]), if(mapisdefined(m000043, n), q = (2^n)-1, while(mapisdefined(xs, prime(i)), i++); q = prime(i)); mapput(xs, q, n)); for(i=1, oo, if(!mapisdefined(xs, prime(i), &u), return(Vec(lista)), listput(lista, prime(u)))); };
v332210 = A332210list(up_to);
A332210(n) = v332210[n];
CROSSREFS
Used to construct permutations A332213, A332215.
Sequence in context: A064011 A050367 A354201 * A192175 A294205 A059459
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 09 2020
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 April 28 12:59 EDT 2024. Contains 372085 sequences. (Running on oeis4.)