A097698 Numbers k such that both 4*k^2 - 3 and 4*k^2 + 3 are primes.
2, 4, 5, 7, 32, 46, 56, 70, 73, 86, 109, 149, 152, 161, 163, 170, 175, 178, 208, 220, 235, 254, 277, 280, 290, 313, 317, 326, 334, 343, 347, 352, 364, 368, 373, 385, 403, 409, 434, 446, 460, 527, 541, 551, 565, 578, 598, 628, 632, 689, 709, 710, 737, 761, 812
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Magma
[n: n in [1..1000] |IsPrime(4*n^2-3) and IsPrime(4*n^2+3)]; // Vincenzo Librandi, Nov 16 2010
-
Mathematica
Select[Range[0,7! ],PrimeQ[ #^2-3]&&PrimeQ[ #^2+3]&]/2 (* Vladimir Joseph Stephan Orlovsky, Apr 23 2010 *) Select[Range[1000],AllTrue[4#^2+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 08 2019 *)
-
PARI
is(n)=isprime(4*n^2-3) && isprime(4*n^2+3) \\ Charles R Greathouse IV, Sep 27 2016
Formula
a(n) = A153975(n) / 2. - Vladimir Joseph Stephan Orlovsky, Apr 23 2010