Maths Olympiad Prep

Library / Irish Mathematical Olympiad /46 of 236

Irish Mathematical Olympiad

Number theory Difficulty 5.0 AIME Prove it Ireland

Let n=(p2+2)2−9(p2−7)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)2−9(p2−7)=p4−5p2+4+63=(p2−1)(p2−4)+63=(p−1)(p+1)(p−2)(p+2)+63=(p−2)(p−1)(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 p≠3p \neq 3, (p−2)(p−1)(p-2)(p-1) and (p+1)(p+2)(p+1)(p+2) are both multiples of 3. Thus n=(p2+2)2−9(p2−7)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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.