OFFSET
1,1
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..117.
EXAMPLE
7 is a term in the sequence because (1!|7) + (2!|7) + (3!|7) + (4!|7) + (5!|7) + (6!|7) = (1|7) + (2|7) + (6|7) + (24|7) + (120|7) + (720|7) = (1|7) + (2|7) + (6|7) + (3|7) + (1|7) + (6|7) = 1 + 1 + (-1) + (-1) + 1 + (-1) = 0.
MATHEMATICA
fQ[n_] := Block[{p = Prime@n, s = 0, k = t = 1}, While[k < p, t = Mod[t*k, p]; k++; s = s + JacobiSymbol[t, p]]; s == 0]; Do[m = n; If[fQ@n, Print@Prime@n], {n, 4000}] (* Robert G. Wilson v, Sep 17 2007 *)
fQ[p_] := Mod[ Sum[ JacobiSymbol[ k!, p], {k, p - 1}], p] == 0; Do[ If[ fQ@ Prime@ n, Print@ Prime@ n], {n, 3008}] (* Robert G. Wilson v, Sep 17 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Chris Monico (c.monico(AT)ttu.edu), Sep 10 2007
EXTENSIONS
More terms from Robert G. Wilson v, Sep 17 2007
STATUS
approved