A128245 Smallest of three consecutive composite numbers whose sum is prime.
6, 9, 12, 18, 21, 22, 35, 36, 42, 45, 51, 65, 69, 78, 82, 88, 96, 102, 111, 125, 126, 135, 138, 161, 162, 165, 166, 172, 189, 198, 209, 232, 249, 255, 256, 261, 275, 291, 292, 305, 312, 316, 329, 335, 336, 345, 348, 352, 366, 371, 382, 396, 399, 408, 429, 432
Offset: 1
Keywords
Examples
6 + 8 + 9 = 23 = A060328(1); 9 + 10 + 12 = 31 = A060328(2); 12 + 14 + 15 = 41 = A060328(3); 18 + 20 + 21 = 59 = A060328(4).
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Crossrefs
Cf. A060328.
Programs
-
Mathematica
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 *) Select[Partition[Select[Range[500],CompositeQ],3,1],PrimeQ[Total[#]]&][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 24 2019 *)
-
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
Formula
By Rosser's theorem, a(2n) > n log n. - Charles R Greathouse IV, Sep 11 2009
Comments