login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A066818
a(n) is the least k such that n + Sum_{i=1..k} A005384(i) is prime; or 0 if none exists.
0
1, 2, 1, 12, 1, 2, 3, 2, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 3, 4, 1, 4, 5, 2, 7, 2, 1, 6, 1, 6, 3, 2, 3, 6, 1, 2, 3, 2, 1, 4, 1, 2, 3, 8, 1, 4, 11, 2, 3, 4, 1, 4, 5, 2, 13, 2, 1, 4, 1, 8, 3, 2, 3, 6, 1, 2, 7, 2, 1, 10, 1, 8, 3, 2, 15, 4, 1, 2, 3, 4, 1, 4, 5, 2, 7, 4
OFFSET
1,2
COMMENTS
There is some empirical evidence to suggest a(n) is nonzero for every n. That is, every n can be expressed as the difference between a prime and a partial sum of the Sophie Germain primes series. See A066753 for a similar conjecture.
EXAMPLE
7 + (2 + 3 + 5) = 17, a prime and three consecutive Sophie Germain primes starting from 2, the first Sophie Germain prime, are needed to achieve this. So a(7) = 3.
PROG
(PARI) a(n) = my(p=0, s=n); for(k=1, oo, until(isprime(2*p+1), p=nextprime(p+1)); if(isprime(s+=p), return(k))); \\ Jinyuan Wang, Jul 30 2020
CROSSREFS
Sequence in context: A176088 A069566 A336314 * A005730 A112284 A167401
KEYWORD
nonn
AUTHOR
Joseph L. Pe, Jan 19 2002
EXTENSIONS
a(53) corrected by and more terms from Jinyuan Wang, Jul 30 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 20 22:42 EDT 2024. Contains 376078 sequences. (Running on oeis4.)