A225078 Numbers n such that n^2+1 and (n+1)^2-2 are both prime.
1, 2, 4, 6, 14, 20, 26, 36, 54, 74, 116, 120, 126, 130, 134, 160, 176, 204, 210, 230, 236, 256, 264, 284, 300, 314, 340, 386, 420, 440, 466, 490, 496, 544, 594, 636, 644, 714, 750, 760, 784, 816, 930, 950, 986, 1070, 1124, 1140, 1146, 1156, 1174, 1176, 1210
Offset: 1
Keywords
Examples
n=2; n+1=3 ;n^2+1=5 and (n+1)^2-2=7. n=490; n+1=491; n^2+1=240101 and (n+1)^2-2=241079.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Legendre's Conjecture
- Wikipedia, Legendre's conjecture
Programs
-
Haskell
import Data.Function (on) import Data.List (elemIndices) a225078 n = a225078_list !! (n-1) a225078_list = elemIndices 1 $ zipWith ((*) `on` a010051') a002522_list a008865_list -- Reinhard Zumkeller, May 06 2013
-
Mathematica
Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* T. D. Noe, May 06 2013 *)
Comments