OFFSET
1,1
LINKS
Zak Seidov and Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 1000 terms from Seidov)
EXAMPLE
a(3) = 41 because prime(3) = 5 and primes == 1 mod 5 are 11, 31, 41;
a(4) = 113 because prime(4) = 7 and primes == 1 mod 7 are 29, 43, 71, 113.
MATHEMATICA
Reap[Sow[3]; Do[c=0; q=Prime[n]; p=1; While[c<n, p=p+2q; If[PrimeQ[p], c++]]; Sow[p], {n, 2, 100}]][[2, 1]]
PROG
(PARI) a(n)=if(n<2, return(3)); my(p=prime(n), q=2*p+1); while(n, if(isprime(q), n--); q+= 2*p); q-2*p \\ Charles R Greathouse IV, Dec 26 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Dec 25 2013
STATUS
approved