A sequence is eventually periodic if there are integers and such that for all . It consists of a finite initial segment followed by a repeating period. Checking finitely many repeated values can suggest eventual periodicity, but a proof requires a reason the repetition continues, such as recurrence of a complete state in a deterministic finite-state process.
Suppose a numerical sequence has period from index , and let . For with , split the required sum into complete periods and a tail of length . Every complete period contributes , proving the formula in the title. Precomputed prefix sums of one period make the tail lookup constant time. If this periodic sequence consists of the first differences of another sequence, the same formula extrapolates that original sequence by adding the initial value at .
Articles by others on the same topic
There are currently no matching articles.