OFFSET
1,1
COMMENTS
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
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
By Rosser's theorem, a(2n) > n log n. - Charles R Greathouse IV, Sep 11 2009
EXAMPLE
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, May 03 2007
STATUS
approved