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!)
A060339 Primes that are each the sum of two, three, and four consecutive composite numbers. 3

%I #12 Jul 01 2020 20:20:12

%S 311,337,1009,1103,1511,1777,3671,3889,4271,4657,5737,6841,7561,9649,

%T 9769,10223,12239,12889,14759,14831,17401,17569,17783,19009,19031,

%U 20903,21529,22369,22751,23279,24049,24889,25057,26423,28871,30671

%N Primes that are each the sum of two, three, and four consecutive composite numbers.

%H Klaus Brockhaus, <a href="/A060339/b060339.txt">Table of n, a(n) for n=1..1000.</a> [From _Klaus Brockhaus_, Jun 17 2009]

%e A(2)= 377 is equal to 168+169 = 111+112+114 = 82+84+85+86.

%t composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); a = b = c = {}; Do[ p = Sum[ composite[ n + m ], {m, 0, 1} ]; If[ PrimeQ[ p ], a = Append[ a, p ] ]; p = Sum[ composite[ n + m ], {m, 0, 2} ]; If[ PrimeQ[ p ], b = Append[ b, p ] ]; p = Sum[ composite[ n + m ], {m, 0, 3} ]; If[ PrimeQ[ p ], c = Append[ c, p ] ], {n, 1, 25000} ]; Intersection[ a, b, c ]

%t Module[{cmp=Select[Range[20000],CompositeQ],c2,c3,c4},c2=Total/@ Partition[ cmp,2,1];c3=Total/@Partition[cmp,3,1];c4=Total/@ Partition[ cmp,4,1];Select[ Intersection[c2,c3,c4],PrimeQ]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 01 2020 *)

%Y Cf. A151744. [From _Klaus Brockhaus_, Jun 17 2009]

%K nonn

%O 1,1

%A _Robert G. Wilson v_, Mar 30 2001

%E Definition clarified by _Harvey P. Dale_, Jul 01 2020

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 24 08:21 EDT 2024. Contains 371926 sequences. (Running on oeis4.)