# Show that $f(n)$ is always divisible by 3

Given that:$$f(n)=1!+2!+3!+4!+\cdots n!$$ for $n\ge2$

$f(n)$ is always divisible by 3.

Demonstration: It seems to work but I can't shows it $$1+2!=3(1)$$ $$1+2!+3!=3(3)$$ $$1+2!+3!+4!=3(11)$$ $$1+2!+3!+4!+5!=3(51)$$ $$1+2!+\cdots+6!=3(291)$$ $$1+2!+\cdots+7!=3(1971)$$ $$1+2!+\cdots+8!=3(15411)$$ $$1+2!+\cdots+9!=3(136371)$$ $$1+2!+\cdots+10!=3(1345971)$$ $$1+2!+\cdots+11!=3(14651571)$$

How can I show that it is true or false?

• Hint: Induction Mar 28 '18 at 15:24
• An easy one! $3!,4!,5!\cdots$ are divisible by $3$. Take it from here! Mar 28 '18 at 15:25

$$1!+2!+3!+4!+\cdots+n!=(1+2)+2\cdot3+2\cdot3\cdot4 +\cdots + 2\cdot3\cdot 4\cdot 5\cdots n=$$ $$=3(1+2+2\cdot 4+2\cdot4\cdot5 + 2\cdot 4\cdot5\cdots n)$$

Proof by induction:

You have shown the base case

$1+2!=3$

Assume the $n-th$ case is divisible by $3$:

$(1+2! + ...+ n!) |3$

Now for the inductive step:

$(1+2! + ...+ n!) + (n+1)!$

Now since you know $(1+2! + ...+ n!)|3$ and also, since $(n+1)!|3$ since $n>2$, then

$\left((1+2! + ...+ n!) + (n+1)! \right)|3$

Note that $1! = 1$, $2! = 2$ and from $n > 2$, $n!$ is divisible by $3$, because $3$ appears in $1 \cdot 2 \cdot 3 \cdot 2 \ldots \cdot n$. Since $3$ is divisible by $1+2$, we are done.

• I am asking for $n\ge2$
– user546240
Mar 28 '18 at 15:29

Note that the sum of the first two terms is 3 and all the other terms are multiples of $3.$

Thus the sum $$1!+2!+3!+4!+\cdots+n!$$ is a multiple of 3 for $n\ge 2$

Note: $$f(n)=3+3!+3!\cdot \sum_{i=4}^n\prod_{j=4}^i j, \ \ n\ge 4.$$