The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A071194 Length (>1) of shortest sequences of consecutive primes started with prime(n) such that sum is also prime. 7
 2, 9, 3, 3, 3, 5, 3, 3, 3, 3, 3, 9, 3, 5, 7, 3, 5, 3, 3, 3, 5, 3, 3, 7, 7, 3, 7, 5, 3, 5, 5, 9, 5, 3, 3, 5, 3, 3, 11, 9, 5, 21, 5, 9, 3, 9, 3, 5, 55, 3, 7, 27, 9, 27, 7, 5, 5, 3, 9, 3, 3, 3, 5, 3, 7, 7, 11, 3, 3, 3, 5, 5, 7, 7, 3, 5, 3, 9, 3, 3, 5, 11, 3, 5, 47, 5, 3, 3, 5, 3, 3, 5, 7, 3, 3, 7, 3, 5, 5, 5, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 EXAMPLE For n=1, start-prime = prime(1) = 2, 2+3=5 is prime, length=2, so a(1)=2; for n=2, start-prime = prime(2) = 3, 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 127 is prime, length=9, all shorter partial sums are composite, so a(2)=9; for n=160, prime(160) = 941, 941 + ... + 1609 = 121123 is prime, a(160)=95. MATHEMATICA Table[k = 2; While[CompositeQ@ Total@ Prime@ Range[n, n + k], k++]; k + 2 Boole[EvenQ@ k] - 1, {n, 120}] (* Michael De Vlieger, Jan 01 2017 *) PROG (PARI) a(n, p=prime(n))=my(q=p, t=2); while(!isprime(p+=q=nextprime(q+1)), t++); t apply(p->a(0, p), primes(30)) \\ Charles R Greathouse IV, Jun 16 2015 CROSSREFS Cf. A071195, A071196, A071197, A071198. Sequence in context: A011240 A021345 A011066 * A137616 A154581 A111689 Adjacent sequences:  A071191 A071192 A071193 * A071195 A071196 A071197 KEYWORD nonn AUTHOR Labos Elemer, May 16 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 26 14:08 EST 2020. Contains 331280 sequences. (Running on oeis4.)