OFFSET
1,1
COMMENTS
Note that all terms after the first are congruent to 7 modulo 12.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Near-Square Prime
FORMULA
Primes m such that m-3 is a square.
a(n) = 3 + (2*A097697(n-1))^2. - R. J. Mathar, Aug 07 2008
EXAMPLE
19 is prime and is equal to 4^2 + 3, so 19 is a term.
MATHEMATICA
Intersection[Table[n^2+3, {n, 0, 10^2}], Prime[Range[9*10^3]]] ...or... For[i=3, i<=3, a={}; Do[If[PrimeQ[n^2+i], AppendTo[a, n^2+i]], {n, 0, 100}]; Print["n^2+", i, ", ", a]; i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
Select[Table[n^2+3, {n, 0, 198000}], PrimeQ] (* Vincenzo Librandi, Dec 08 2011 *)
PROG
(Magma) [n: n in PrimesUpTo(175000) | IsSquare(n-3)]; // Bruno Berselli, Apr 05 2011
(Magma) [a: n in [0..300] | IsPrime(a) where a is n^2+3]; // Vincenzo Librandi, Dec 08 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Jobling (paul.jobling(AT)whitecross.com)
STATUS
approved