Let be a sequence of numbers, where each is either or . For each positive integer , define Suppose for all . What is the value of the sum
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
S_n is the inverse of 7 mod 2^n; because 7 divides 2^{3m} − 1, the bits are 1 then 1,1,0 repeating: x_k = 0 iff 3 divides positive k.
Solution
is the -bit binary number , so the condition says is the unique inverse of modulo ; each is determined, and adds one bit on top. The desired sum is the -bit block .
Small cases (each checked directly, e.g. ): , , , , , , . The bits are : after the block seems to repeat.
Proof of the pattern: since , the number is an integer, with binary form ( blocks). Let . Then
and , so . In binary, is the bitwise complement of plus one: . Reading from the bottom, and for , exactly when .
Take so . Then (), , , ().
The sum is .
The answer is .
Why this works
The sequence is the binary expansion of in the -adic sense: each is the unique residue inverting modulo , and these residues are consistent because they are truncations of one infinite bit string. The -periodicity comes from , exactly as has period because . Computing small cases reveals the pattern; a single identity () proves it.
Alternative approach
The bits are the -adic expansion of . Since , we have , whose binary digits are . Negating in binary (complement every bit, then add ) gives , the same pattern: , then blocks upward. Truncating this string to bits gives exactly the residue with .
The trap
Assuming the bits repeat 111 or 011 from the first few (x₀ = x₁ = x₂ = 1) without computing far enough to see the period-3 pattern 0,1,1.
Common mistakes
- Assuming the bits repeat 111 or 011 from the first few (x₀ = x₁ = x₂ = 1) without computing far enough to see the period-3 pattern 0,1,1.
- Misaligning the period: for positive multiples of , so and vanish; shifting by one gives or instead of .
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Compute small cases, spot the pattern, generalize