OFFSET
1,1
COMMENTS
Also, primes of the form k^2 - 2k + 3.
Note that all terms after the first two are equal to 11 modulo 72 and that (a(n)-11)/72 is a triangular number, since they have to be 2 more than the square of an odd multiple of 3 to be prime, and if k = 6*m+3 then a(n) = k^2 + 2 = 72*m*(m+1)/2 + 11.
The quotient cycle length is 2 in the continued fraction expansion of sqrt(p) for these primes. E.g.: cfrac(sqrt(6563),6) = 81+1/(81+1/(162+1/(81+1/(162+1/(81+1/(162+`...`)))))). - Labos Elemer, Feb 22 2001
Primes in A059100; except for a(2)=3 a subsequence of A007491 and congruent to 2 modulo 9. For n>2, a(n)=11 (mod 72). - M. F. Hasler, Apr 05 2009
REFERENCES
M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
Eric Weisstein's World of Mathematics, Near-Square Prime
FORMULA
a(n) = A067201(n)^2 + 2. - M. F. Hasler, Apr 05 2009
MAPLE
select(isprime, [seq(t^2+2, t = 0..1000)]); # Robert Israel, Sep 03 2015
MATHEMATICA
Select[ Range[0, 500]^2 + 2, PrimeQ] (* Robert G. Wilson v, Sep 03 2015 *)
PROG
(Magma) [n: n in PrimesUpTo(175000) | IsSquare(n-2)]; // Bruno Berselli, Apr 05 2011
(Magma) [ a: n in [0..450] | IsPrime(a) where a is n^2 +2 ]; // Vincenzo Librandi, Apr 06 2011
(PARI) print1("2, 3"); forstep(n=3, 1e4, 6, if(isprime(t=n^2+2), print1(", "t))) \\ Charles R Greathouse IV, Jul 19 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 05 2000
STATUS
approved