OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..5100
EXAMPLE
a(5)= 29 which is 10th prime. prime(10)+3*10= 29+30= 59 which is also prime.
a(7)= 53 which is 16th prime. prime(16)+3*16= 53+48= 101 which is also prime.
MAPLE
KD := proc() local a, b; a:= ithprime(n); b:= a+3*n; if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..500);
MATHEMATICA
KD = Select[Table[{Prime[n], Prime[n] + 3*n}, {n, 200}], PrimeQ[#[[2]]] &]; Transpose[KD][[1]]
PROG
(PARI) is(n)=isprime(n) && isprime(n+3*primepi(n)) \\ Charles R Greathouse IV, Nov 08 2013
(Magma) [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+3*n)]; // Vincenzo Librandi, Jan 19 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Nov 08 2013
STATUS
approved