login
Primes prime(n) such that prime(2*n) - n is prime.
0

%I #41 Sep 08 2022 08:46:11

%S 2,3,13,29,89,113,199,229,263,281,317,337,349,541,593,673,683,827,857,

%T 911,929,971,997,1069,1109,1291,1399,1481,1657,1693,1733,1759,1783,

%U 1877,1907,1931,2003,2053,2089,2377,2543,2551,2777,2903,3011,3023,3041,3089,3181,3251,3361,3617,3671

%N Primes prime(n) such that prime(2*n) - n is prime.

%C Primes prime(n) such that A031215(n) - n is prime.

%e 3 is in this sequence because 3 is prime(2) and prime(2*2) - 2 = prime(4)- 2 = 7 - 2 = 5 is prime.

%p seq(`if`(isprime(ithprime(2*n)-n),ithprime(n),NULL),n=1..1000); # _Robert Israel_, Apr 13 2015

%t Prime[Select[Range[555],PrimeQ[Prime[2*#]-#]&]] (* _Ivan N. Ianakiev_, Apr 14 2015 *)

%o (Magma) [NthPrime(n): n in [1..550] | IsPrime(NthPrime(2*n)-n)];

%o (PARI) for(n=1,10^3,if(isprime(prime(2*n)-n),print1(prime(n),", "))) \\ _Derek Orr_, Apr 14 2015

%Y Cf. A031215.

%K nonn,easy

%O 1,1

%A _Juri-Stepan Gerasimov_, Apr 13 2015