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.

A378559 a(n) = t is the smallest prime t > p = prime(n) for which t == p (mod k) for all k = 2,...,p-1.

Original entry on oeis.org

3, 5, 17, 67, 2531, 27733, 2162177, 12252259, 465585143, 240940299629, 6987268688431, 577614211574437, 48086383113568841, 438120379479182443, 75356705270419372847, 27891400538213970357653, 5584478196651286064932859, 38762848659108926803651261, 23645337682056445350227232067
Offset: 1

Views

Author

Tamas Sandor Nagy, Nov 30 2024

Keywords

Examples

			a(4) = 67 because prime(4) = 7, and 7 and 67 mod each k = {2, 3, 4, 5, 6} both have remainders {1, 1, 3, 2, 1} in that order, and 67 is the smallest prime after 7 that has this property.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n], d}, d = LCM @@ Range[p - 1]; p += d; While[!PrimeQ[p], p += d]; p]; Array[a, 20] (* Amiram Eldar, Dec 01 2024 *)
  • PARI
    a(n) = my(p=prime(n), vr = vector(p-2, k, p % (k+1)), q = nextprime(p+1)); while (vector(p-2, k, q % (k+1)) != vr, q = nextprime(q+1)); q; \\ Michel Marcus, Dec 01 2024

Formula

a(n) == prime(n) (mod A058254(n)). - Amiram Eldar, Dec 01 2024