login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163213 Swinging Wilson remainders ((p-1)$ + (-1)^floor((p+2)/2))/p mod p, p prime. Here '$' denotes the swinging factorial function (A056040). 4
1, 1, 1, 3, 1, 6, 9, 13, 12, 2, 19, 2, 5, 36, 6, 19, 43, 11, 47, 67, 39, 41, 70, 12, 17, 83, 88, 81, 25, 53, 91, 97, 106, 79, 43, 39, 7, 29, 73, 6, 79, 115 (list; graph; refs; listen; history; text; internal format)
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

WR := proc(f, r, n) map(p->(f(p-1)+r(p))/p mod p, select(isprime, [$1..n])) end:

A002068 := n -> WR(factorial, p->1, n);

A163213 := n -> WR(swing, p->(-1)^iquo(p+2, 2), n);

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

Cf. A163211, A002068, A163210.

Sequence in context: A089710 A065918 A020861 * A095066 A169955 A084536

Adjacent sequences:  A163210 A163211 A163212 * A163214 A163215 A163216

KEYWORD

nonn

AUTHOR

Peter Luschny, Jul 24 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 01:23 EST 2020. Contains 338864 sequences. (Running on oeis4.)