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.

A238460 Primes p for which x! + (p-1)!/x!==0 (mod p) has only two solutions 1<=x<=p-2 following from Wilson theorem: x = 1 and x = p-2.

Original entry on oeis.org

5, 13, 37, 41, 101, 113, 157, 173, 181, 197, 229, 241, 281, 313, 337, 349, 353, 373, 409, 421, 433, 509, 541, 617, 677, 701, 757, 761, 769, 773, 821, 929, 941, 977, 997, 1013, 1093, 1097, 1109, 1181, 1193, 1237, 1409, 1433, 1481, 1489, 1669, 1693, 1721, 1741
Offset: 1

Views

Author

Vladimir Shevelev, Feb 27 2014

Keywords

Comments

a(n) is prime(k(n)) for which A238444(k(n)) = 2.

Crossrefs

Cf. A238444.

Programs

  • Mathematica
    A238444[n_] := a[n] = Module[{p, r}, p = Prime[n]; r = Range[p-2]; Count[r!+(p-1)!/r!, k_ /; Divisible[k, p]]]; A238460 = Prime /@ (Position[Table[A238444[n], {n, 1, 300}], 2] // Flatten) (* Jean-François Alcover, Feb 27 2014 *)
  • PARI
    is(p)=if(!isprime(p),return(0)); my(X=Mod(1,p),P=Mod((p-1)!,p));for(x=2,p-3,X*=x;P/=x;if(X+P==0,return(0))); p>3 \\ Charles R Greathouse IV, Feb 28 2014

Formula

a(n) == 1 (mod 4).
Proof. Using Wilson's theorem, for every p>3, p==3(mod 4) we have, at least, 3 solution in [1,p-2] of x! + (p-1)!/x!==0 (mod p): x = 1, x = (p-1)/2, x = p-2.

Extensions

More terms from Peter J. C. Moses, Feb 27 2014