Work out consecutive integers instantly with clear inputs, formula shown and shareable results.
A run of k consecutive integers starting at a sums to ka + k(k−1)/2. Solving for a gives a = (S − k(k−1)/2) / k, which is a whole number only for certain combinations of S and k.
Sum of a run
S = k·a + k(k − 1)/2 ⇒ a = (S − k(k−1)/2) / k
a = (100 − 28)/8 = 9, so 9 through 16.
For an even count k the sum must be k/2 times an odd number; otherwise no whole-number run exists.