%I #9 Jul 30 2015 01:24:52
%S 8,10,14,30,54,58,62,66,82,108,114,120,178,182,204,210,318,324,330,
%T 352,366,430,506,544,560,586,596,616,704,738,792,858,870,914,918,960,
%U 988,990,1026,1030,1062,1164,1170,1194,1404,1442,1446,1462,1464,1470,1498
%N Composite numbers C(p) such that p and C(p)-p are primes.
%C Nextprime(C(n)) = P(C(n) - n) = (C(n) - n)-th prime.
%C A proof that the sequence is infinite would be nice.
%F C(n)=n+k where k is such that nextprime(C(n))=k-th prime.
%e a(4)=30 because C(19)=30=19+11, 19 and 11 are prime and P(11)=31=nextprime(30).
%t Composite[n_Integer] := FixedPoint[n + PrimePi[ # ] + 1 &, n]; Composite /@ Select[ Prime[ Range[ 205]], PrimeQ[ Composite[ # ] - # ] &] (* _Robert G. Wilson v_, Dec 11 2004 *)
%t 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 *)
%K nonn
%O 1,1
%A _Robin Garcia_, Dec 11 2004
%E Edited and extended by _Robert G. Wilson v_, Dec 11 2004