OFFSET
1,1
COMMENTS
Nextprime(C(n)) = P(C(n) - n) = (C(n) - n)-th prime.
A proof that the sequence is infinite would be nice.
FORMULA
C(n)=n+k where k is such that nextprime(C(n))=k-th prime.
EXAMPLE
a(4)=30 because C(19)=30=19+11, 19 and 11 are prime and P(11)=31=nextprime(30).
MATHEMATICA
Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n]; Composite /@ Select[ Prime[ Range[ 205]], PrimeQ[ Composite[ # ] - # ] &] (* Robert G. Wilson v, Dec 11 2004 *)
Reap[For[n = 4; p = 1, n <= 1500, n++, If[! PrimeQ[n], If[PrimeQ[p] && PrimeQ[n-p], Sow[n]]; p++]]] [[2, 1]] (* Jean-François Alcover, Jul 18 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robin Garcia, Dec 11 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v, Dec 11 2004
STATUS
approved