Maths Olympiad Prep

Library / /13 of 39

Number theory Difficulty 5.0 AIME Prove it Ireland

Let n=(p2+2)29(p27)n = (p^2 + 2)^2 - 9(p^2 - 7) where pp is a prime number. What is the smallest value of the sum of the digits of nn and for what prime numbers pp is this value attained?

Solution

When p=2p = 2, n=63n = 63. When p=3p = 3, n=103n = 103. When p=5p = 5, n=567n = 567.

(p2+2)29(p27)=p45p2+4+63=(p21)(p24)+63=(p1)(p+1)(p2)(p+2)+63=(p2)(p1)(p+1)(p+2)+63 \begin{aligned} (p^2 + 2)^2 - 9(p^2 - 7) &= p^4 - 5p^2 + 4 + 63 \\ &= (p^2 - 1)(p^2 - 4) + 63 \\ &= (p - 1)(p + 1)(p - 2)(p + 2) + 63 \\ &= (p - 2)(p - 1)(p + 1)(p + 2) + 63 \end{aligned}

When p3p \neq 3, (p2)(p1)(p-2)(p-1) and (p+1)(p+2)(p+1)(p+2) are both multiples of 3. Thus n=(p2+2)29(p27)n = (p^2 + 2)^2 - 9(p^2 - 7) is a multiple of 9 and so the digit sum is a multiple of 9. When n=3n = 3, the digit sum is 4. Thus this is the smallest value that can be obtained.

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.