OFFSET
1,2
COMMENTS
The distance between the n-th Mersenne prime and the previous prime.
FORMULA
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
KEYWORD
nonn,hard,more,changed
AUTHOR
Robert P. P. McKone, Aug 24 2023
EXTENSIONS
a(29)-a(31) from Michael S. Branicky, Sep 01 2024
STATUS
approved