%I #17 Jun 21 2021 14:56:00
%S 2,5,13,17,31,37,71,73,109,101,199,157,313,197,241,257,307,379,419,
%T 401,463,617,599,577,701,677,757,953,929,991,1117,1153,1123,1259,1471,
%U 1297,1481,1483,1873,1601,1723,1933,1979,2069,2161,2347,2351,2593,2549,2551
%N Smallest prime == 1 (mod n) and > n^2.
%C Primes arising in A087554.
%C Since A014085(n) ~ n/log(n) one may conjecture that a(n) < 2*n^2 for all n > 1. Numerically we find a(n) = n^2*(1 + O(1/sqrt(n))). - _M. F. Hasler_, Feb 27 2020
%H M. F. Hasler, <a href="/A087952/b087952.txt">Table of n, a(n) for n = 1..10000</a>, Feb 27 2020
%e For n=1, a(1) = 2, because 2 == 1 mod 1 and 2 > 1^2.
%e For n=2, a(2) = 5, because 5 == 1 mod 2 and 5 > 2^2.
%t spr[n_]:=Module[{p=NextPrime[n^2]},While[Mod[p,n]!=1,p=NextPrime[p]];p]; Join[ {2},Array[spr,50,2]] (* _Harvey P. Dale_, Jun 21 2021 *)
%o (PARI) apply( {A087952(n)=forprime(p=n^2+1,,(p-1)%n||return(p))}, [1..66]) \\ _M. F. Hasler_, Feb 27 2020
%Y Cf. A034693, A034694, A087554.
%Y Cf. A014085 (number of primes between n^2 and (n+1)^2).
%K nonn
%O 1,1
%A _Ray Chandler_, Sep 16 2003
%E Examples added by _N. J. A. Sloane_, Jun 21 2021