[go: up one dir, main page]

login
A225078
Numbers n such that n^2+1 and (n+1)^2-2 are both prime.
1
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,2
COMMENTS
Prime limits of the Legendré conjecture for a given n.
LINKS
Eric Weisstein's World of Mathematics, Legendre's Conjecture
EXAMPLE
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.
MATHEMATICA
Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* T. D. Noe, May 06 2013 *)
PROG
(TI-BASIC) ClrIO:Input "n", n:Lbl colorin:if isPrime(n^2+1) and
isPrime((n+1)^2-2) Then:Disp n:Pause:Endif:n+1(sto)n:Goto colorin:EndPrgm
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
CĂ©sar Aguilera, Apr 26 2013
STATUS
approved