login
A212309
a(n) = n! mod 3^n.
4
0, 1, 2, 6, 24, 120, 720, 666, 954, 8586, 26811, 58725, 173259, 1189485, 3898206, 1077462, 17239392, 34789338, 238787595, 275338926, 2019994119, 578463687, 2265847911, 52114501953, 121029900948, 201452158890, 1848601693368, 4158660811014, 2058540433587, 36820880119062
OFFSET
0,3
LINKS
MATHEMATICA
Table[Mod[n!, 3^n], {n, 0, 30}] (* Harvey P. Dale, Apr 01 2018 *)
PROG
(Python)
import math
print([math.factorial(n)%(3**n) for n in range(99)])
(PARI) a(n) = n! % 3^n; \\ Michel Marcus, Jan 22 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Oct 24 2013
STATUS
approved