OFFSET
1,1
COMMENTS
Conjecture: This sequence is infinite.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The third prime is 5, the third composite is 8, 8+5=13, the first entry.
MAPLE
Primes, Composites:= selectremove(isprime, [$2..10^4]):
select(isprime, Primes + Composites[1..nops(Primes)]); # Robert Israel, Jul 08 2016
MATHEMATICA
nn = 222; Select[Total /@ Transpose@{#, Take[Complement[Range@ Prime@ nn, {1}~Join~#], nn]} &@ Prime@ Range@ nn, PrimeQ] (* Michael De Vlieger, Jul 08 2016 *)
PROG
(PARI) composite(n)= local(c, x); c=1; x=1; while(c <= n, x++; if(!isprime(x), c++); ); return(x);
g(n)=for(x=1, n, y=prime(x)+composite(x); if(isprime(y), print1(y", ")))
(PARI) list(lim)=my(v=List(), p=5, c=8, t); while((t=p+c) <= lim, if(isprime(t), listput(v, t)); p=nextprime(p+1); if(isprime(c++), c++)); Vec(v) \\ Charles R Greathouse IV, Sep 01 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Nov 15 2005
EXTENSIONS
Name corrected by Adam Kubias, Jul 08 2016
STATUS
approved