OFFSET
0,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
Wikipedia, Wilson's theorem
FORMULA
a(n) = A000142(n) (mod n + 3).
If n > 1 and a(n) > 0, a(n) = n/2 + 1 and n + 3 is a prime.
MAPLE
seq(n! mod (n+3), n=0..100); # Robert Israel, Apr 30 2017
PROG
(PARI) a(n) = n! % (n+3); \\ Michel Marcus, Apr 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Apr 29 2017
STATUS
approved