Skip to main content

2022/23 AHSMC Part 1 Problem 16

Problem 16 of 16

Let Z≥0\mathbb{Z}_{\ge 0} be the set of non-negative integers and f ⁣:Z≥0→Z≥0f \colon \mathbb{Z}_{\ge 0} \to \mathbb{Z}_{\ge 0}, f(n)=min⁡∣x+2y∣f(n) = \min |x+2y|, where xx, yy are integers such that 5x+3y=n5x + 3y = n. The value of the sum f(0)+f(1)+⋯+f(100)f(0) + f(1) + \cdots + f(100) is

Answer choices

Show solution

Solution

From 5x+3y=n5x + 3y = n one obtains y=n−5x3=n+x3−2xy = \dfrac{n-5x}{3} = \dfrac{n+x}{3} - 2x, and since xx and yy are integers we must have n+x=3kn + x = 3k, where kk is an integer. Thus x=3k−nx = 3k - n, y=k−2(3k−n)=2n−5ky = k - 2(3k - n) = 2n - 5k and hence f(n)=min⁡∣x+2y∣=min⁡∣(3k−n)+2(2n−5k)∣=min⁡∣3n−7k∣, f(n) = \min |x+2y| = \min \bigl|(3k-n) + 2(2n-5k)\bigr| = \min |3n - 7k|, where n∈Z≥0n \in \mathbb{Z}_{\ge 0} and kk is any integer. We remark that f(n+7)=min⁡∣3n−7(k−3)∣=f(n)f(n+7) = \min |3n - 7(k-3)| = f(n) so ff is periodic of principal period of 77. On the other hand, f(0)=0, f(1)=3, f(2)=1, f(3)=2, f(4)=2, f(5)=1, f(6)=3, f(0) = 0,\ f(1) = 3,\ f(2) = 1,\ f(3) = 2,\ f(4) = 2,\ f(5) = 1,\ f(6) = 3, values which are obtained using k=0k = 0, k=0k = 0, k=1k = 1, k=1k = 1, k=2k = 2, k=2k = 2 and k=3k = 3 respectively. We conclude that f(0)+f(1)+⋯+f(100)=14⋅(f(0)+f(1)+⋯+f(6))+f(0)+f(1)+f(2)=14⋅12+4=172. f(0) + f(1) + \cdots + f(100) = 14 \cdot \bigl(f(0) + f(1) + \cdots + f(6)\bigr) + f(0) + f(1) + f(2) = 14 \cdot 12 + 4 = 172. The answer is (A).