A232768 Numbers n with the property that n^2+(n+1)^2 and n^2+(n+1)^2+(n+2)^2 are both prime.
2, 12, 14, 24, 34, 122, 154, 164, 272, 342, 464, 612, 674, 734, 784, 794, 854, 1174, 1262, 1274, 1364, 1392, 1524, 1554, 1664, 1682, 1844, 1854, 1862, 1892, 1924, 1942, 1994, 2232, 2294, 2354, 2442, 2592, 2802, 2884, 3124, 3164, 3292, 3394, 3544, 3594, 3632, 3724, 3892, 3904, 3922
Offset: 1
Examples
When x=14, 2x^2+2x+1=421 and 3x^2+6x+5=677. 14 is the third value of x for which both these polynomials produce a prime number, so a(3)=14.
References
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2005, page 266.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
- Wikipedia, Hardy and Littlewood's Conjecture F.
Programs
-
Mathematica
lst = {}; Do[If[And[PrimeQ[n^2 + (n + 1)^2], PrimeQ[n^2 + (n + 1)^2 + (n + 2)^2]], Print[n]; AppendTo[lst, n]], {n, 10000}] Select[Range[2,4000,2],AllTrue[{(#^2+(#+1)^2),(#^2+(#+1)^2+(#+2)^2)},PrimeQ]&] (* Harvey P. Dale, Jul 30 2023 *)
Comments