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.

A332210 Permutation of primes, inverse of A332211.

Original entry on oeis.org

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
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Sequence is well-defined also in case there are only a finite number of Mersenne primes.

Crossrefs

Used to construct permutations A332213, A332215.

Programs

  • 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];

Formula

For all applicable n >= 1, a(A059305(n)) = a(A000720(A000668(n))) = A000040(A000043(n)).