If you have an arithmetic sequence of length (where ), how many arithmetic subarrays does it contain?
For : just (the whole sequence). For : subarrays (length 3 at positions 0-2 and 1-3, plus length 4). For : subarrays.
The pattern: , which is . This is a summation formula in disguise.