OFFSET
1,1
EXAMPLE
For n= 1, c(1) = 4, p(1) = 2; c(2) + p(4) = 6+ 7= 13 = a(1).
For n= 2, c(2) = 6, p(2) = 3; c(3) + p(6) = 8+13= 21 (nonprime).
For n= 3, c(3) = 8, p(3) = 5; c(5) + p(8) = 10+19= 29 = a(2).
For n= 4, c(4) = 9, p(4) = 7; c(7) + p(9) = 14+23= 37 = a(3).
For n= 5, c(5) =10, p(5) =11; c(11) + p(10) = 20+29= 49 (nonprime).
For n= 6, c(6) =12, p(6) =13; c(13) + p(12) = 22+37= 59 = a(4).
PROG
(PARI) p(n) = prime(n); \\ A000040
c(n) = for(k=0, primepi(n), isprime(n++)&&k--); n; \\ A002808
select(isprime, vector(70, n, c(p(n)) + p(c(n)))) \\ Michel Marcus, Jan 29 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Aug 14 2008
EXTENSIONS
Edited and extended by Ray Chandler, Aug 19 2008
STATUS
approved