OFFSET
1,4
COMMENTS
It appears that if n is one less than an odd prime then (n!)^2 modulo n(n+1)/2 is n(n-1)/2 else 0. This result appears to hold for any even power of n!. See A119690 for similar results related to odd powers of n!.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MATHEMATICA
Table[Mod[(n!)^2, (n^2 + n)/2], {n, 100}] (* Vincenzo Librandi, Jul 10 2014 *)
Table[PowerMod[n!, 2, (n(n+1))/2], {n, 100}] (* Harvey P. Dale, Aug 27 2016 *)
PROG
(PARI) a(n) = (n!)^2 % (n*(n+1)/2); \\ Michel Marcus, Jul 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
John W. Layman, Jul 12 2010
STATUS
approved