OFFSET
0,4
EXAMPLE
a(3) = 3^6 mod 6^3 = 729 mod 216 = 81.
PROG
(Python)
import math
for n in range(12):
f = math.factorial(n)
print (n**f) % (f**n),
(Maxima) A187751(n):=mod(n^(n!), (n!)^n)$ makelist(A187751(n), n, 0, 9); /* Martin Ettl, Jan 13 2013 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jan 03 2013
STATUS
approved