login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A225078 Numbers n such that n^2+1 and (n+1)^2-2 are both prime. 1

%I #14 May 06 2013 17:07:05

%S 1,2,4,6,14,20,26,36,54,74,116,120,126,130,134,160,176,204,210,230,

%T 236,256,264,284,300,314,340,386,420,440,466,490,496,544,594,636,644,

%U 714,750,760,784,816,930,950,986,1070,1124,1140,1146,1156,1174,1176,1210

%N Numbers n such that n^2+1 and (n+1)^2-2 are both prime.

%C Prime limits of the Legendré conjecture for a given n.

%H Reinhard Zumkeller, <a href="/A225078/b225078.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LegendresConjecture.html">Legendre's Conjecture</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Legendre%27s_conjecture">Legendre's conjecture</a>

%e n=2; n+1=3 ;n^2+1=5 and (n+1)^2-2=7.

%e n=490; n+1=491; n^2+1=240101 and (n+1)^2-2=241079.

%t Select[Range[2000], PrimeQ[#^2 + 1] && PrimeQ[(# + 1)^2 - 2] &] (* _T. D. Noe_, May 06 2013 *)

%o (TI-BASIC) ClrIO:Input "n",n:Lbl colorin:if isPrime(n^2+1) and

%o isPrime((n+1)^2-2) Then:Disp n:Pause:Endif:n+1(sto)n:Goto colorin:EndPrgm

%o (Haskell)

%o import Data.Function (on)

%o import Data.List (elemIndices)

%o a225078 n = a225078_list !! (n-1)

%o a225078_list = elemIndices 1 $

%o zipWith ((*) `on` a010051') a002522_list a008865_list

%o -- _Reinhard Zumkeller_, May 06 2013

%Y Cf. A002522, A008865, A010051, A014085, A002496, A028871.

%K nonn

%O 1,2

%A _CĂ©sar Aguilera_, Apr 26 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)