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!)
A078097 Least m such that P - m is prime, where P is the n-th perfect number. 1
1, 5, 5, 5, 5, 17, 9, 65, 93, 129, 627, 111, 407, 795, 377, 1509, 257, 5207, 1233, 8537, 3917, 20253, 4613, 15435, 5619, 43823 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Some of the larger entries may only correspond to probable primes.
LINKS
MATHEMATICA
e (* from A000043 *) = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, ...}; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; Do[p = 2^(e[[n]] - 1)*(2^e[[n]] - 1); Print[p - PrevPrim[p]], {n, 1, 20}]
#-NextPrime[#, -1]&/@PerfectNumber[Range[15]] (* The program generates the first 15 terms of the sequence. To generate more, increase the Range constant but the program may take a long time to run. *) (* Harvey P. Dale, Nov 22 2023 *)
CROSSREFS
Sequence in context: A076407 A134701 A291655 * A285243 A339704 A282209
KEYWORD
hard,more,nonn
AUTHOR
Jason Earls, Dec 01 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Dec 03 2002
a(19)-a(26) from Donovan Johnson, Feb 22 2008
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 August 18 18:48 EDT 2024. Contains 375273 sequences. (Running on oeis4.)