Beyond the specification map. Recursive function summed by block-doubling structure — recursion work, not AP/GP formulae. It is kept in the library for extra maths practice, not as specification-point coverage.
The function F(k) is defined for positive integers by F(1)=1, F(2)=1, F(3)=−1 and by the identities F(2k)=F(k),F(2k+1)=F(k) for k≥2. The sum F(1)+F(2)+F(3)+⋯+F(100) equals
−15;
28;
64;
81.
Solution
It is easiest here to think of F(1), F(2), … as a sequence.
The recursion rules F(2k)=F(k) and F(2k+1)=F(k) mean that the kth value gets repeated at the consecutive positions 2k and 2k+1. Given the starting values, this means the values of F(k), when listed in sequence, are 1,1,−1,×21,1,×2−1,−1,×41,1,1,1,×4−1,−1,−1,−1,×81,1,1,1,1,1,1,1,−1,−1,… (where the numbers underneath indicate how many repeated numbers appear in the block).
The strings of −1s end at positions 3, 7, 15, 31, …, so if the first 3 or first 7 or first 15 or … terms are added, the sum will be equal to 1, as all +1s and −1s will cancel out except the first 1.
Continuing in this manner, we find that the sum of the first 127 terms is equal to 1. The last 32 terms, and in particular F(101) to F(127), are all −1s. So F(1)+F(2)+F(3)+⋯+F(100)+all −1sF(101)+⋯+F(127)=1 giving F(1)+F(2)+F(3)+⋯+F(100)=1−(−27)=28.
Alternatively, the sum of the first 63 terms is 1, the next 32 terms (up to F(95)) are +1, and the final 5 terms are −1, so the total is 1+32−5=28.