login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes the sum of five consecutive composite numbers.
6

%I #7 Dec 28 2024 22:35:26

%S 37,53,67,83,97,157,293,307,353,367,503,547,683,743,757,907,953,967,

%T 983,997,1193,1553,1567,1733,1747,2153,2617,2843,2857,3083,3203,3217,

%U 3307,4057,4133,4283,4297,5107,5153,5167,5303,6143,6397,6607,7253,7417

%N Primes the sum of five consecutive composite numbers.

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

%t composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); a = {}; Do[ p = composite[ n ] + composite[ n + 1 ] + composite[ n + 2 ] + composite[ n + 3 ] + composite[ n + 4 ]; If[ PrimeQ[ p ], a = Append[ a, p ] ], {n, 1, 1500} ]; a

%o (PARI) list(lim)=my(v=List(),u=[4,6,8,9,0],i=5); forcomposite(n=10,lim\1, u[i]=n; if(i++>5,i=1); my(p=vecsum(u)); if(p>lim, break); if(i++>5,i=1); if(isprime(p), listput(v,p))); Vec(v) \\ _Charles R Greathouse IV_, Dec 27 2024

%K nonn,changed

%O 1,1

%A _Robert G. Wilson v_, Mar 30 2001