OFFSET
1,1
LINKS
Syed Iddi Hasan, Table of n, a(n) for n = 1..10000
EXAMPLE
2 + 3 + 5 + 7 + 11 + 13 + 17 = 58 = 2*29
3 + 5 + 7 + 11 + 13 + 17 + 19 = 75 = 3*5^2
5 + 7 + 11 + 13 + 17 + 19 + 23 = 95 = 5*19
7 + 11 + 13 + 17 + 19 + 23 + 29 = 119 = 7*17
11 + 13 + 17 + 19 + 23 + 29 + 31 = 143 = 11*13
13 + 17 + 19 + 23 + 29 + 31 + 37 = 169 = 13*13
17 + 19 + 23 + 29 + 31 + 37 + 41 = 197 (prime)
MAPLE
Primes:= select(isprime, [seq(i, i=3..10000, 2)]):
S:= ListTools:-PartialSums(Primes):
select(isprime, S[8..-1]-S[1..-8]); # Robert Israel, Dec 14 2017
MATHEMATICA
Select[ListConvolve[{1, 1, 1, 1, 1, 1, 1}, Prime[Range[200]]], PrimeQ] (* Harvey P. Dale, Jul 12 2013 *)
Select[Total/@Partition[Prime[Range[200]], 7, 1], PrimeQ] (* Harvey P. Dale, Jul 24 2017 *)
PROG
(PARI) \\ primes in the sum of m odd number of consecutive primes. m=7
psumprm(m, n) = { sr=0; s=0; for(j=1, m, s+=prime(j); ); for(x=1, n, s = s - prime(x)+ prime(x+m); if(isprime(s), sr+=1.0/s; print1(s" ")); ); print(); print(sr) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, May 09 2003
EXTENSIONS
Corrected by Michael Somos, Feb 01 2004
STATUS
approved