OFFSET
1,1
COMMENTS
Primes arising in A087554.
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
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..10000, Feb 27 2020
EXAMPLE
For n=1, a(1) = 2, because 2 == 1 mod 1 and 2 > 1^2.
For n=2, a(2) = 5, because 5 == 1 mod 2 and 5 > 2^2.
MATHEMATICA
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 *)
PROG
(PARI) apply( {A087952(n)=forprime(p=n^2+1, , (p-1)%n||return(p))}, [1..66]) \\ M. F. Hasler, Feb 27 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray Chandler, Sep 16 2003
EXTENSIONS
Examples added by N. J. A. Sloane, Jun 21 2021
STATUS
approved