Maths Olympiad Prep

Library / /13 of 45

, 2008

Number theory Difficulty 5.4 AIME, harder Prove it Slovenia

Let n=(p21)(p24)+9n = (p^2 - 1)(p^2 - 4) + 9. Assuming pp is a prime number, what is the least possible sum of the digits of nn? Find all prime numbers pp for which this value is attained.

Solution

Let us find the first few nn. When p=2p=2 we have n=9n=9, when p=3p=3 we have n=49n=49 and when p=5p=5 we have n=513n=513. Now, let p>5p > 5. Rewrite nn as n=(p2)(p1)(p+1)(p+2)+9n = (p-2)(p-1)(p+1)(p+2)+9. Since (p2),(p1),p,(p+1),(p+2)(p-2), (p-1), p, (p+1), (p+2) are five consecutive positive integers, at least one of them is divisible by 55. Since p>5p > 5, pp is not divisible by 55. Hence, 55 divides one of the numbers (p2),(p1),(p+1),(p+2)(p-2), (p-1), (p+1), (p+2) and must also divide their product (p2)(p1)(p+1)(p+2)(p-2)(p-1)(p+1)(p+2). At least one of the numbers p+1p+1 and p+2p+2 is even, so this product is divisible by 22. Thus, for p>5p > 5 the number (p2)(p1)(p+1)(p+2)(p-2)(p-1)(p+1)(p+2) is divisible by 1010. For all p>5p > 5 the number nn has at least two digits and the final digit is 99, so the sum of the digits is greater than 99. We conclude that the least possible sum of the digits is 99 and this value is attained only when p=2p = 2 or p=5p = 5.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.