login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236431 Numbers n such that both prime(n)+n and prime(n)-n give a triangular number. 0

%I #10 Jul 22 2022 16:20:11

%S 1,513,213796

%N Numbers n such that both prime(n)+n and prime(n)-n give a triangular number.

%C Intersection of A115882 and A115883.

%C The corresponding primes are 2, 3673, 2955107.

%C No more terms up to 10^12. - _Giovanni Resta_, Jan 26 2014

%e prime(1) is 2, and both 2+1=3 and 2-1=1 are triangular.

%t Select[Range[214000],AllTrue[{Sqrt[8(Prime[#]-#)+1],Sqrt[8(Prime[#]+#)+ 1]},OddQ]&] (* _Harvey P. Dale_, Jul 22 2022 *)

%o (PARI) lista(nn) = {p = primes(nn); for (n=1, #p, pn = p[n]; if (ispolygonal(pn - n, 3) && ispolygonal(pn + n, 3), print1(n, ", ")););}

%Y Cf. A115882, A115883.

%K nonn,bref,more

%O 1,2

%A _Michel Marcus_, Jan 25 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 16:43 EDT 2024. Contains 374322 sequences. (Running on oeis4.)