OFFSET
1,1
COMMENTS
It is conjectured that this sequence is infinite.
Primes 2,3,5,7,13,... are in A062326. - Zak Seidov, Oct 05 2014
REFERENCES
D. Shanks, Solved and Unsolved Problems in Number Theory, 2nd. ed., Chelsea, 1978, p. 31.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
P. De Geest, Palindromic Quasipronics of the form n(n+x)
Eric Weisstein's World of Mathematics, Near-Square Prime
FORMULA
a(n) = sqrt(2 + A028871(n)). - Zak Seidov, Oct 05 2014
EXAMPLE
5^2 - 2 = 23 is prime, so 5 is in the sequence.
MAPLE
select(k->isprime(k^2-2), [$1..300]); # Muniru A Asiru, Jul 15 2018
MATHEMATICA
a[n_]:=n^x-y; lst={}; x=2; y=2; Do[If[PrimeQ[a[n]], AppendTo[lst, n]], {n, 0, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 03 2009 *)
Select[Range[300], PrimeQ[#^2-2]&] (* Harvey P. Dale, Mar 21 2013 *)
PROG
(Magma) [n: n in [1..1000] |IsPrime( n^2 - 2)]; // Vincenzo Librandi, Nov 18 2010
(PARI) is(n)=isprime(n^2-2) \\ Charles R Greathouse IV, Jul 01 2013
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved