OFFSET
1,2
COMMENTS
Prime limits of the Legendré conjecture for a given n.
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
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