{
  "slug": "nonresidue-records",
  "kind": "nonresidue",
  "title": "Record least quadratic nonresidues",
  "short": "n_p records",
  "problem": "least-quadratic-nonresidue",
  "dir": "max",
  "instant": true,
  "metric": "n_p / ln p for a prime p with 10⁶ ≤ p < 10²⁴: primes whose least quadratic nonresidue is unusually large",
  "certificate": "{\"p\": \"…\"}",
  "check": "deterministic Miller–Rabin (13 bases, exact below 3.3·10²⁴) and an Euler-criterion scan for n_p; instant",
  "record": {
    "value": "5.2756",
    "who": "OEIS A000229 b-file (from T. Oliveira e Silva's tables)",
    "year": null,
    "source": "https://oeis.org/A000229/b000229.txt",
    "implies": "p = 8402847753431 has n_p = 157 (157 / ln p ≈ 5.2756); largest tabulated n_p is 163 at p = 70864718555231"
  },
  "upper": null,
  "series": [
    {
      "key": "n_p=131",
      "value": "196265095009",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=137",
      "value": "513928659191",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=139",
      "value": "5528920734431",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=149",
      "value": "2871842842801",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=151",
      "value": "4306732833311",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=157",
      "value": "8402847753431",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    },
    {
      "key": "n_p=163",
      "value": "70864718555231",
      "who": "OEIS A000229 (least prime with this least nonresidue)",
      "year": null,
      "source": "https://oeis.org/A000229/b000229.txt"
    }
  ],
  "history": [],
  "notes": "OEIS A000229: a(n) is the least m such that prime(n) is the least quadratic nonresidue mod m (always a prime). The b-file gives n = 1..38, attributed to Tomás Oliveira e Silva's web page; a(38) = 70864718555231 (n_p = 163) is the largest tabulated. Because each a(n) is the least prime with that n_p, the maximum of n_p/ln p over all p up to the search range is attained at a b-file term; over the table it is at p = 8402847753431 (n_p = 157), ratio 5.2756. Other normalisations over the same table: n_p/(ln p)^2 is maximized by tiny p (p = 3), so it is not a useful ladder metric; n_p/(ln p · ln ln p) is also maximized at p = 8402847753431 (≈ 1.555). I recomputed n_p for the four largest terms (139, 151, 157, 163) and their primality on 2026-11-24. The search limit behind a(38) and whether a(39) (n_p = 167) is known were not stated on the OEIS page. I found no other published table of record n_p / log p.",
  "sourceTitle": "Least quadratic nonresidue: primes whose least nonresidue is unusually large",
  "entries": []
}