Let f:Z+∗→Z+∗ be a function defined as follows: given n, we write n=2a⋅(2b+1), with a and b non-negative integers, and define f(n)=a2+a+1.
Determine the least positive integer n such that f(1)+f(2)+⋯+f(n)≥123456.
Solution
Let Sk=f(1)+f(2)+f(3)+⋯+f(2k). Then Sk=f(1)+f(2)+⋯+f(2k−1)+f(1)+f(2)+⋯+f(2k−1−1)+f(2k) ⇔Sk=2Sk−1−f(2k−1)+f(2k) ⇔Sk=2(Sk−1+k) If n=(atat−1…a0)2 is the binary expansion of n, it is easy to see that f(1)+⋯+f(n)=∑ai⋅Si. Also, by induction, Sk>Sk−1+⋯+S0, so that in order to obtain the least n satisfying f(1)+⋯+f(n)≥123456, we have to choose S14+S13+S7+S2+S1=123456, that is, n=214+213+27+22+21=24710.
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.