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”).

A365161
Least k such that A000668(n) - k is prime, where A000668(n) is the n-th Mersenne prime.
2
1, 2, 2, 14, 12, 8, 18, 18, 30, 20, 170, 24, 114, 56, 156, 2510, 1824, 12, 3980, 3630, 16902, 284, 7712, 20022, 12930, 9698, 16232, 1058, 256016, 23712, 26298
OFFSET
1,2
COMMENTS
The distance between the n-th Mersenne prime and the previous prime.
FORMULA
a(n) = A001223(A059305(n)-1). - Michel Marcus, Aug 25 2023
a(n) = A000668(n) - A073715(n). - Amiram Eldar, Aug 10 2024
EXAMPLE
A000668(6) = 131071, the previous prime is 131063, so a(6) = 131071 - 131063 = 8.
MATHEMATICA
m[n_] := m[n] = (2^MersennePrimeExponent[n] - 1); a[k_, n_] := a[k, n] = m[n] - k; l[k_, n_] := l[k, n] = PrimeQ[a[k, n]]; Table[k = 1; Monitor[Parallelize[While[True, If[l[k, n], Break[]]; k++]; k], {n, k}], {n, 1, 20}]
CROSSREFS
Cf. A000040, A000668 (Mersenne primes), A001223, A059305, A073715, A365160.
Sequence in context: A068511 A306544 A060590 * A129083 A045685 A045676
KEYWORD
nonn,hard,more
AUTHOR
Robert P. P. McKone, Aug 24 2023
EXTENSIONS
a(29)-a(31) from Michael S. Branicky, Sep 01 2024
STATUS
approved