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!)
A234847 Primes which are sum of the first k composite numbers and such that the sum of the first k+1 composites is also prime. 3

%I #7 Aug 12 2014 08:36:12

%S 997,1049,1709,2137,2953,3889,3989,28643,43451,121937,189239,225077,

%T 662843,785303,860143,874351,959209,1026229,1051151,1271687,1285507,

%U 1772297,2525801,2834413,2865199,3456053,3484361,3538477,4402241,4762267,8240539,11557543,15774301

%N Primes which are sum of the first k composite numbers and such that the sum of the first k+1 composites is also prime.

%H Harvey P. Dale, <a href="/A234847/b234847.txt">Table of n, a(n) for n = 1..1000</a>

%e a(1)= 997 is prime and sum of the first 35 composites from 4 to 51. And the sum of the first 36 composites is 1049 and is also prime.

%t Transpose[Select[Partition[Accumulate[Select[Range[ 10000], CompositeQ]],2,1],AllTrue[ #,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 12 2014 *)

%o (PARI) i=0; b=0; for( a=2, 6000, if( !isprime(a) ,i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1)& !isprime(a+1)) || (isprime(b) & isprime(b+a+2) & isprime(a+1)), print1(b,", "))))

%Y Cf. A053782

%K nonn

%O 1,1

%A _Robin Garcia_, Dec 31 2013

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 10:29 EDT 2024. Contains 371905 sequences. (Running on oeis4.)