Clear Notion Academy

Permutations and Combinations (Beyond Advanced) Practice: Let S n=1 1!+2 2!+3 3!+ +n n! . Find the smallest positive integer n for which S n+1 is…

Question

Let Sn=1⋅1!+2⋅2!+3⋅3!+⋯+n⋅n!S_n=1\cdot 1!+2\cdot 2!+3\cdot 3!+\cdots+n\cdot n!. Find the smallest positive integer nn for which Sn+1S_n+1 is divisible by 10710^{7}.

Answer

Answer: 29

Hint

Write k⋅k!=(k+1)!−k!k\cdot k!=(k+1)!-k! and see what the sum becomes; then count prime factors in a factorial.

Solution

Since k⋅k!=(k+1)!−k!k\cdot k!=(k+1)!-k!, the sum telescopes: Sn=(n+1)!−1S_n=(n+1)!-1, so Sn+1=(n+1)!S_n+1=(n+1)!. We need 107∣(n+1)!10^7\mid (n+1)!. Factors of 22 are plentiful, so the condition is v5((n+1)!)≥7v_5((n+1)!)\ge 7 (and then v2≥7v_2\ge7 holds automatically). v5(m!)=⌊m/5⌋+⌊m/25⌋+⋯v_5(m!)=\lfloor m/5\rfloor+\lfloor m/25\rfloor+\cdots. For m=29m=29 this is 5+1=6<75+1=6<7; for m=30m=30 it is 6+1=76+1=7. So the smallest m=n+1m=n+1 is 3030. Hence n=29n=29. The common slip is to answer n=30n=30 (the value of mm), or 3535 by forgetting the extra factor of 55 contributed by 2525.

More questions from Permutations and Combinations (Beyond Advanced) Practice

Practise the full set: Permutations and Combinations — Beyond Advanced