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.

A250406 Values of B such that p = prime(n) satisfies (p-1)! == -1-B*p (mod p^2), i.e., p is a near-Wilson prime.

Original entry on oeis.org

1, 2, 0, 2, 10, 0, 12, 17, 15, 11, 12, 30, 25, 30, 41, 19, 32, 5, 55, 2, 62, 6, 63, 19, 27, 29, 46, 106, 79, 18, 56, 12, 81, 72, 55, 65, 6, 55, 146, 67, 131, 109, 32, 158, 50, 81, 38, 43, 114, 98, 64, 132, 45, 37, 80, 190, 148, 101, 252, 4, 119, 62, 36, 52, 25
Offset: 1

Views

Author

Felix Fröhlich, Nov 22 2014

Keywords

Comments

p is in A007540 iff a(n) == 0.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 0, m, p = Prime[n]}, m = Mod[(p - 1)!, p^2]; While[ Mod[-1 - k*p, p^2] != m, k++]; k]; Array[f, 70] (* Robert G. Wilson v, Dec 03 2014 *)
  • PARI
    forprime(p=1, 1e9, b=0; while(Mod((p-1)!, p^2)!=-1-b*p, b++); print1(b, ", "))