cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A087952 Smallest prime == 1 (mod n) and > n^2.

Original entry on oeis.org

2, 5, 13, 17, 31, 37, 71, 73, 109, 101, 199, 157, 313, 197, 241, 257, 307, 379, 419, 401, 463, 617, 599, 577, 701, 677, 757, 953, 929, 991, 1117, 1153, 1123, 1259, 1471, 1297, 1481, 1483, 1873, 1601, 1723, 1933, 1979, 2069, 2161, 2347, 2351, 2593, 2549, 2551
Offset: 1

Views

Author

Ray Chandler, Sep 16 2003

Keywords

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

Examples

			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.
		

Crossrefs

Cf. A014085 (number of primes between n^2 and (n+1)^2).

Programs

  • 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 *)
  • PARI
    apply( {A087952(n)=forprime(p=n^2+1,,(p-1)%n||return(p))}, [1..66]) \\ M. F. Hasler, Feb 27 2020

Extensions

Examples added by N. J. A. Sloane, Jun 21 2021