OFFSET
1,4
COMMENTS
If this is zero, p is a swinging Wilson prime.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Peter Luschny, Die schwingende Fakultät und Orbitalsysteme, August 2011.
Peter Luschny, Swinging Primes.
EXAMPLE
The swinging Wilson quotient related to the 5th prime is (252+1)/11=23, so the 5th term is 23 mod 11 = 1.
MAPLE
MATHEMATICA
sf[n_] := n!/Quotient[n, 2]!^2; a[n_] := (p = Prime[n]; Mod[(sf[p - 1] + (-1)^Floor[(p + 2)/2])/p, p]); Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Jun 28 2013 *)
PROG
(PARI) sf(n)=n!/(n\2)!^2
apply(p->sf(p-1)\/p%p, primes(100)) \\ Charles R Greathouse IV, Dec 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 24 2009
STATUS
approved