login
Primes p of the form p = r+(r+1)/2 (where r is a prime number).
5

%I #15 Aug 19 2020 15:47:31

%S 5,11,17,29,47,71,89,101,107,191,197,227,251,269,317,359,461,467,521,

%T 569,647,659,701,719,821,857,881,911,929,947,971,1091,1109,1181,1217,

%U 1259,1289,1361,1367,1451,1487,1559,1637,1847,1889,1979,2099,2141,2207

%N Primes p of the form p = r+(r+1)/2 (where r is a prime number).

%C Or primes of the form Sum_{x=1..n-th prime} (1-(-1)^x*x). - _Juri-Stepan Gerasimov_, Jul 14 2009

%C Primes p such that (2*p-1)/3 is prime. - _J. M. Bergot_, Aug 19 2020

%H Robert Israel, <a href="/A162336/b162336.txt">Table of n, a(n) for n = 1..10000</a>

%e 3+2=5, 7+4=11, 11+6=17, 19+10=29, 31+16=47, 47+24=71,.. r:3,7,11,19,31,47,59,67,71,127,131,151,167,179,211,239,307,311, ..A158709.

%p filter:= p -> isprime(p) and isprime((2*p-1)/3):

%p select(filter, [seq(i,i=5..10000,6)]); # _Robert Israel_, Aug 19 2020

%t lst={};Do[r=Prime[n];p=r+(r+1)/2;If[PrimeQ[p],AppendTo[lst,p]],{n,6!}];lst

%t Select[#+(#+1)/2&/@Prime[Range[300]],PrimeQ] (* _Harvey P. Dale_, Apr 30 2015 *)

%Y Cf. A158709.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jul 01 2009

%E Edited by _N. J. A. Sloane_, Jul 18 2009