The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A090303 Begin with n and consider numbers obtained by successively subtracting 2,3,5,7,11,...; a(n) = largest prime that arises, i.e., largest prime of the form n - sum prime(r), or 0 if no such prime exists. 1
0, 0, 0, 2, 3, 0, 5, 3, 7, 5, 0, 7, 11, 0, 13, 11, 7, 13, 17, 3, 19, 17, 13, 19, 23, 0, 17, 23, 19, 13, 29, 0, 31, 29, 7, 31, 0, 0, 37, 23, 31, 37, 41, 3, 43, 41, 37, 43, 47, 0, 41, 47, 43, 37, 53, 0, 47, 53, 31, 43, 59, 0, 61, 59, 37, 61, 0, 0, 67, 53, 61, 67, 71, 0, 73, 71, 67, 73, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(p) = p-2 if p is larger member of a twin prime pair.
Conjecture: There are finitely many zeros in this sequence.
LINKS
FORMULA
Largest prime of the form n - sum prime(r).
PROG
(PARI) a(n) = {p = 2; n -= p; while ((n > 0) && !isprime(n), p = nextprime(p+1); n -= p); max(0, n); } \\ Michel Marcus, Jul 29 2017
CROSSREFS
Cf. A090304.
Sequence in context: A080367 A354365 A066913 * A277516 A322333 A346615
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Nov 30 2003
EXTENSIONS
More terms from David Wasserman, Oct 27 2005
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 May 21 01:24 EDT 2024. Contains 372720 sequences. (Running on oeis4.)