Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #26 Sep 17 2023 10:08:44
%S 3,5,17,23,31,37,41,43,61,89,103,107,109,113,151,163,191,193,241,251,
%T 257,269,281,307,311,313,317,359,373,409,433,463,487,557,563,593,601,
%U 607,643,647,691,701,761,787,811,823,857,863,907,911,953,977,1019,1033
%N Primes p = prime(k) such that p + 2*k is prime.
%H K. D. Bajpai, <a href="/A231232/b231232.txt">Table of n, a(n) for n = 1..5800</a>
%e 31 = prime(11) is a term: prime(11) + 2*11 = 31 + 22 = 53 is also prime.
%e 89 = prime(24) is a term: prime(24) + 2*24 = 89 + 48 = 137 is also prime.
%p KD := proc() local a,b; a:= ithprime(n); b:= a+2*n; if isprime(b) then RETURN (a); fi; end: seq(KD(),n=1..500);
%t t = Select[Table[{Prime[n], Prime[n] + 2*n}, {n, 200}], PrimeQ[#[[2]]] &]; Transpose[t][[1]] (* _T. D. Noe_, Nov 06 2013 *)
%o (PARI) is(n)=isprime(n+2*primepi(n)) && isprime(n) \\ _Charles R Greathouse IV_, Aug 25 2014
%o (Magma) [NthPrime(n): n in [1..250] | IsPrime(NthPrime(n)+2*n)]; // _Vincenzo Librandi_, Jan 19 2015
%Y Cf. A061068 (primes: prime(m) plus its subscript).
%Y Cf. A064402 (numbers n: prime(n)+n is prime).
%Y Subsequence of A364877.
%K nonn,easy
%O 1,1
%A _K. D. Bajpai_, Nov 06 2013
%E Name edited by _David A. Corneth_, Sep 07 2023