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!)
A249113 Take n and successively add 1, 2, ..., a(n) until reaching a prime for the third time. 3
4, 5, 16, 5, 11, 13, 8, 6, 19, 6, 12, 13, 7, 9, 28, 5, 11, 13, 12, 17, 19, 6, 11, 25, 8, 6, 28, 5, 20, 37, 7, 14, 19, 10, 11, 34, 8, 6, 40, 6, 20, 25, 8, 9, 31, 6, 11, 25, 19, 21, 19, 6, 12, 25, 16, 9, 28, 5, 20, 22, 7, 14, 40, 9, 11, 34, 19, 6, 52, 17, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecturally (Hardy & Littlewood conjecture F), a(n) exists for all n. - Charles R Greathouse IV, Oct 21 2014
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
n+A000217(k) is prime for k=a(n) and exactly two smaller positive values. - M. F. Hasler, Oct 21 2014
EXAMPLE
a(1)=4 because 1+1+2+3+4=11 and exactly two partial sums are prime (2,7).
a(2)=5 because 2+1+2+3+4+5=17 and exactly two partial sums are prime (3,5).
MATHEMATICA
Table[k = 0; Do[k++; While[! PrimeQ[n + Total@ Range@ k], k++], {x, 3}]; k, {n, 71}] (* Michael De Vlieger, Jan 03 2016 *)
PROG
(PARI) a(n)=my(k, s=3); while(s, if(isprime(n+=k++), s--)); k \\ Charles R Greathouse IV, Oct 21 2014
(PARI) a(n, s=3)=my(k); until(isprime(n+=k++)&&!s--, ); k \\ allows one to get A249112(n) as a(n, 2). - M. F. Hasler, Oct 21 2014
CROSSREFS
Sequence in context: A323627 A289742 A340850 * A166590 A368739 A244643
KEYWORD
easy,nonn
AUTHOR
Gil Broussard, Oct 21 2014
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 April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)