Let Z≥0 be the set of non-negative integers and f:Z≥0→Z≥0, f(n)=min∣x+2y∣, where x, y are integers such that 5x+3y=n. The value of the sum f(0)+f(1)+⋯+f(100) is
Answer choices
Show solution
Solution
From 5x+3y=n one obtains y=3n−5x=3n+x−2x, and since x and y are integers we must have n+x=3k, where k is an integer. Thus x=3k−n, y=k−2(3k−n)=2n−5k and hence f(n)=min∣x+2y∣=min(3k−n)+2(2n−5k)=min∣3n−7k∣, where n∈Z≥0 and k is any integer. We remark that f(n+7)=min∣3n−7(k−3)∣=f(n) so f is periodic of principal period of 7. 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, values which are obtained using k=0, k=0, k=1, k=1, k=2, k=2 and k=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. The answer is (A).