Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #41 Sep 08 2022 08:45:01
%S 2,3,11,83,227,443,1091,1523,2027,3251,6563,9803,11027,12323,13691,
%T 15131,21611,29243,47963,50627,56171,59051,62003,65027,74531,88211,
%U 91811,95483,103043,119027,123203,131771,136163,140627,149771,173891
%N Primes of the form k^2 + 2.
%C Also, primes of the form k^2 - 2k + 3.
%C 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.
%C 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
%C 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
%D M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
%D Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.
%H T. D. Noe, <a href="/A056899/b056899.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Near-SquarePrime.html">Near-Square Prime</a>
%F For n>1, a(n) = 72*A000217(A056900(n-2))+11
%F a(n) = A067201(n)^2 + 2. - _M. F. Hasler_, Apr 05 2009
%p select(isprime, [seq(t^2+2, t = 0..1000)]); # _Robert Israel_, Sep 03 2015
%t Select[ Range[0, 500]^2 + 2, PrimeQ] (* _Robert G. Wilson v_, Sep 03 2015 *)
%o (Magma) [n: n in PrimesUpTo(175000) | IsSquare(n-2)]; // _Bruno Berselli_, Apr 05 2011
%o (Magma) [ a: n in [0..450] | IsPrime(a) where a is n^2 +2 ]; // _Vincenzo Librandi_, Apr 06 2011
%o (PARI) print1("2, 3");forstep(n=3,1e4,6,if(isprime(t=n^2+2),print1(", "t))) \\ _Charles R Greathouse IV_, Jul 19 2011
%Y Intersection of A146327 and A000040; intersection of A059100 and A000040.
%Y Cf. A002496.
%K nonn
%O 1,1
%A _Henry Bottomley_, Jul 05 2000