login
Numbers n such that sum of first 2n primes is prime.
1

%I #11 Jun 13 2017 12:14:12

%S 1,2,3,6,7,30,32,48,50,51,54,57,61,62,65,66,73,76,79,81,89,96,99,102,

%T 103,104,107,108,148,154,163,164,165,166,167,171,175,178,179,213,223,

%U 229,230,232,240,242,244,256,265,268,274,284,310,315,338,340,348,354

%N Numbers n such that sum of first 2n primes is prime.

%C 6 is in the sequence because the sum of the first 2*6=12 primes as 2+3+5+7+11+13+17+19+23+29+31+37=197 which is prime.

%H Charles R Greathouse IV, <a href="/A070301/b070301.txt">Table of n, a(n) for n = 1..10000</a>

%t p = 0; Do[p = p + Prime[2n - 1] + Prime[2n]; If[ PrimeQ[p], Print[n]], {n, 1, 10^4}]

%t nn=360;With[{prs=Prime[Range[2nn]]},Select[Range[nn],PrimeQ[Total[Take[ prs,2#]]]&]] (* _Harvey P. Dale_, Aug 22 2011 *)

%o (PARI) list(lim)=my(v=List(),n,s); lim\=1; lim*=2; forprime(p=2,, if(n++>lim, break); s+=p; if(n%2==0 && isprime(s), listput(v,n/2))); Vec(v) \\ _Charles R Greathouse IV_, Jun 13 2017

%K nonn

%O 1,2

%A _Lekraj Beedassy_, May 10 2002

%E Edited by _Robert G. Wilson v_, May 13 2002