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!)
A171447 Numbers n such that n+1 is prime, and (n+1)^3-n^3 is prime. 1

%I #12 Sep 08 2022 08:45:50

%S 1,2,4,6,10,28,30,42,52,58,66,88,108,136,156,172,196,238,312,346,352,

%T 388,448,520,546,556,570,576,598,612,646,676,732,742,786,856,906,940,

%U 976,1050,1068,1092,1152,1192,1222,1228,1236,1302,1432,1452,1458,1480

%N Numbers n such that n+1 is prime, and (n+1)^3-n^3 is prime.

%H Vincenzo Librandi, <a href="/A171447/b171447.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A165682(n)-1. - R. J. Mathar, Jan 04 2011

%e for n=10, 10+1=11 and 11^3-10^3=331; n=28, 28+1=29 and 29^3-28^3=2437

%t Select[Range[1500], PrimeQ[# + 1]&&PrimeQ[(# + 1)^3 - #^3]&] (* _Vincenzo Librandi_, Apr 05 2013 *)

%o (Magma) [n: n in [1..1500] | IsPrime(n+1) and IsPrime( (n+1)^3-n^3)]; // _Vincenzo Librandi_, Apr 05 2013

%o (PARI) is(n)=isprime(n+1) && isprime(3*n^3+3*n+1) \\ _Charles R Greathouse IV_, Jun 13 2017

%Y Cf. A165682.

%K nonn,easy

%O 1,2

%A _Vincenzo Librandi_, Dec 09 2009

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 April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)