OFFSET
1,1
EXAMPLE
For n=1, a(1)=5; then a(2)=7 because a(2)+a(1) = 5+7 = 12 = (11+13)/2 and (11,13) are twin primes.
a(3)=11 because a(3)+a(2) = 11+7 = 18 = (17+19)/2 and (17,19) are twin primes.
PROG
(PARI) {
a=5; b=a; sm=1; print1(a", ");
while(sm<60,
b=nextprime(b+1);
if(isprime(a+b-1)&&isprime(a+b+1),
a=b; sm+=1; print1(b", ")
)
)
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Dimitris Valianatos, May 13 2016
STATUS
approved