Problem 6
There are lamps in a circle, where and . At step , if is lit, switch , otherwise do nothing. Initially all lamps are on. Show that (a) there is a positive integer such that after steps all lamps are on again; (b) if , take ; (c) if , take .
Step 4 of 5: Evaluate the power-of-two case
In plain words
Frobenius squaring over F_2 makes powers of two collapse the recurrence.
Detailed analysis
For n a power of two, repeatedly square the prefix-sum recurrence over F_2. The binomial coefficients between the endpoints vanish in pairs, and the coordinate-update word reduces to the identity after n^2-1 updates on u. Thus the stated value is valid.