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.

This page as a plain text file.
%I A250406 #20 Dec 20 2014 03:54:01
%S A250406 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,
%T A250406 29,46,106,79,18,56,12,81,72,55,65,6,55,146,67,131,109,32,158,50,81,
%U A250406 38,43,114,98,64,132,45,37,80,190,148,101,252,4,119,62,36,52,25
%N 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.
%C A250406 p is in A007540 iff a(n) == 0.
%H A250406 Robert G. Wilson v, <a href="/A250406/b250406.txt">Table of n, a(n) for n = 1..1000</a>
%H A250406 E. Costa, R. Gerbicz and D. Harvey, <a href="http://dx.doi.org/10.1090/S0025-5718-2014-02800-7">A search for Wilson primes</a>, Math. Comp., 83 (2014), 3071-3091.
%H A250406 R. Crandall, K. Dilcher and C. Pomerance, <a href="http://dx.doi.org/10.1090/S0025-5718-97-00791-6">A search for Wieferich and Wilson primes</a>, Math. Comp., 66 (1997), 433-449.
%t A250406 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 *)
%o A250406 (PARI) forprime(p=1, 1e9, b=0; while(Mod((p-1)!, p^2)!=-1-b*p, b++); print1(b, ", "))
%Y A250406 Cf. A007540, A241014, A244801, A250407.
%K A250406 nonn
%O A250406 1,2
%A A250406 _Felix Fröhlich_, Nov 22 2014