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.

A128245 Smallest of three consecutive composite numbers whose sum is prime.

This page as a plain text file.
%I A128245 #15 Jul 24 2019 16:52:17
%S A128245 6,9,12,18,21,22,35,36,42,45,51,65,69,78,82,88,96,102,111,125,126,135,
%T A128245 138,161,162,165,166,172,189,198,209,232,249,255,256,261,275,291,292,
%U A128245 305,312,316,329,335,336,345,348,352,366,371,382,396,399,408,429,432
%N A128245 Smallest of three consecutive composite numbers whose sum is prime.
%C A128245 If n is a member of this sequence, either n+1 or n+2 is prime. This suggests that the density of the sequence is roughly kn/log^2 n for some k. Counts up to 10^9 suggest k is about 5.26. - _Charles R Greathouse IV_, Sep 11 2009
%H A128245 Harvey P. Dale, <a href="/A128245/b128245.txt">Table of n, a(n) for n = 1..1000</a>
%F A128245 By Rosser's theorem, a(2n) > n log n. - _Charles R Greathouse IV_, Sep 11 2009
%e A128245 6 + 8 + 9 = 23 = A060328(1);
%e A128245 9 + 10 + 12 = 31 = A060328(2);
%e A128245 12 + 14 + 15 = 41 = A060328(3);
%e A128245 18 + 20 + 21 = 59 = A060328(4).
%t A128245 CompositeNext[n_]:=Module[{k=n+1},While[PrimeQ[k],k++ ];k]; lst={};Do[p=n+CompositeNext[n]+CompositeNext[CompositeNext[n]];If[ !PrimeQ[n]&&PrimeQ[p],AppendTo[lst,n]],{n,2,5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Jun 15 2009 *)
%t A128245 Select[Partition[Select[Range[500],CompositeQ],3,1],PrimeQ[Total[#]]&][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 24 2019 *)
%o A128245 (PARI) test(n)={my(b=a+1,c);b+=isprime(b);c=b+1;c+=isprime(c);isprime(a+b+c)};for(n=4,1e3,if(!isprime(n)&&test(n),print1(n","))) \\ _Charles R Greathouse IV_, Sep 11 2009
%Y A128245 Cf. A060328.
%K A128245 nonn
%O A128245 1,1
%A A128245 _Zak Seidov_, May 03 2007