返回题库

PUMaC 2009 · 数论(B 组) · 第 2 题

PUMaC 2009 — Number Theory (Division B) — Problem 2

专题
Discrete Math / 离散数学
难度
L3
来源
PUMaC

题目详情

  1. Suppose you are given that for some positive integer n , 1! + 2! + ... + n ! is a perfect square. Find the sum of all possible values of n .
解析
  1. Suppose you are given that for some n ∈ N , the expression 1! + 2! + ... + n ! is a perfect square. Find the sum of all possible values of n . Solution. 4. Note that it is easy to check the result for n = 1 , 2 , 3 , 4, which yield the results 1, 3, 9 and 33 respectively. Out of these, obviously, two are squares, and so 1 and 3 do satisfy the condition. Now, note that 5! has a factor of 10, coming from one 2 and one 5. So, the last digit of 5! is 0. In fact, the last digit of any factorial after 4 is 0 for precisely the same reason. Hence, the sum of some consecutive factorials after 4 is going to give us a number with last digit 0. Adding that to 1! + 2! + 3! + 4!, we get a number whose last digit is a 3, but that cannot be a perfect square. Hence, the given expression is not a perfect square for n ≥ 5, and in fact we have checked the rest of the values ourselves. It follows that 1 and 3 are the only solutions, and so our answer is 1 + 3 = 4.