A060327 Primes the sum of both two and three consecutive composite numbers.
31, 41, 67, 71, 109, 113, 131, 139, 199, 211, 239, 251, 269, 293, 311, 337, 379, 409, 419, 487, 491, 499, 521, 571, 599, 631, 701, 751, 769, 773, 787, 829, 881, 919, 941, 953, 991, 1009, 1013, 1039, 1049, 1061, 1103, 1117, 1151, 1193, 1229, 1291, 1301
Offset: 1
Keywords
Examples
a(2) = 41 which is equal to 20+21 and 12+14+15.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
composite[ n_Integer ] := (k = n + PrimePi[ n ] + 1; While[ k - PrimePi[ k ] - 1 != n, k++ ]; k); a = {}; Do[ p = composite[ n ] + composite[ n + 1 ]; If[ PrimeQ[ p ], a = Append[ a, p ] ], {n, 1, 1000} ]; b = {}; Do[ p = composite[ n ] + composite[ n + 1 ] + composite[ n + 2 ]; If[ PrimeQ[ p ], b = Append[ b, p ] ], {n, 1, 1000} ]; Intersection[ a, b ] Module[{cmps=Select[Range[700],CompositeQ],c2,c3},c2=Total/@Partition[cmps,2,1];c3=Total/@Partition[cmps,3,1];Select[Intersection[c2,c3],PrimeQ]] (* Harvey P. Dale, Nov 12 2022 *)