cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A060327 Primes the sum of both two and three consecutive composite numbers.

This page as a plain text file.
%I A060327 #6 Nov 12 2022 17:29:16
%S A060327 31,41,67,71,109,113,131,139,199,211,239,251,269,293,311,337,379,409,
%T A060327 419,487,491,499,521,571,599,631,701,751,769,773,787,829,881,919,941,
%U A060327 953,991,1009,1013,1039,1049,1061,1103,1117,1151,1193,1229,1291,1301
%N A060327 Primes the sum of both two and three consecutive composite numbers.
%H A060327 Harvey P. Dale, <a href="/A060327/b060327.txt">Table of n, a(n) for n = 1..1000</a>
%e A060327 a(2) = 41 which is equal to 20+21 and 12+14+15.
%t A060327 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 ]
%t A060327 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 *)
%K A060327 nonn
%O A060327 1,1
%A A060327 _Robert G. Wilson v_, Mar 30 2001