OFFSET
1,1
COMMENTS
This includes A002496, primes that are of the form n^2+1.
Note that a(n) is the smallest prime p such that n^(p+1) == -1 (mod p). - Thomas Ordowski, Nov 08 2019
REFERENCES
H. Rademacher, Lectures on Elementary Number Theory, pp. 33-38.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
Array[FactorInteger[#^2 + 1][[1, 1]] &, {83}] (* Michael De Vlieger, Sep 08 2015 *)
PROG
(PARI) smallasqp1(m) = { for(a=1, m, y=a^2 + 1; f = factor(y); v = component(f, 1); v1 = v[length(v)]; print1(v[1]", ") ) }
(PARI) A089120(n)=factor(n^2+1)[1, 1] \\ M. F. Hasler, Mar 11 2012
(Magma) [Min(PrimeDivisors(n^2+1)):n in [1..100]]; // Marius A. Burtea, Nov 13 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Dec 05 2003
STATUS
approved