OFFSET
1,1
COMMENTS
There are at most 5n/log n members of this sequence up to n, since at least one of a(n), a(n) + 1, ..., a(n) + 4 is prime (else their sum is divisible by 5).
EXAMPLE
4+6+8+9+10=37,.. p=37,53,67,83,97,157,..(A060330)
MATHEMATICA
CompositeNext[n_]:=Module[{k=n+1}, While[PrimeQ[k], k++ ]; k]; lst={}; Do[p=n+CompositeNext[n]+CompositeNext[CompositeNext[n]]+CompositeNext[CompositeNext[CompositeNext[n]]]+CompositeNext[CompositeNext[CompositeNext[CompositeNext[n]]]]; If[ !PrimeQ[n]&&PrimeQ[p], AppendTo[lst, n]], {n, 2, 5*6!}]; lst
Transpose[Select[Partition[Select[Range[2100], CompositeQ], 5, 1], PrimeQ[ Total[ #]]&]][[1]] (* Harvey P. Dale, Aug 14 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jun 15 2009
EXTENSIONS
Comment from Charles R Greathouse IV, Nov 11 2009
STATUS
approved