# Summing the factorials

Algebra Level 5

Let $$\displaystyle a_n = n!(n+1)^2$$ and $$\displaystyle S=\sum_{n=0}^{94} a_n$$.

Find the remainder when $$S$$ is divided by 97 .

Notation: $$!$$ denotes the factorial notation. For example, $$8! = 1\times2\times3\times\cdots\times8$$.

×