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

A078096
Least m such that P + m is a prime, where P is the n-th perfect number.
0
1, 1, 3, 19, 1, 7, 1, 105, 37, 163, 73, 43, 45, 649, 3753, 5323, 423, 3123, 9981, 12943
OFFSET
1,3
COMMENTS
Some of the larger entries may only correspond to probable primes.
EXAMPLE
a(3)=3 because 496 + 3 is a prime.
MATHEMATICA
e (* from A000043 *) = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, ...}; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[p = 2^(e[[n]] - 1)*(2^e[[n]] - 1); Print[NextPrim[p] - p], {n, 1, 20}]
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Jason Earls, Dec 01 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Dec 03 2002
a(19)-a(20) from Jinyuan Wang, Jun 13 2020
STATUS
approved