I can see the pattern, but how do I check if this is true for all numbers up to, say a million or more?
$1+2=3$
$4+5+6=7+8$
$9+10+11+12=13+14+15$
$16+17+18+19+20=21+22+23+24$
I can see the pattern, but how do I check if this is true for all numbers up to, say a million or more?
$1+2=3$
$4+5+6=7+8$
$9+10+11+12=13+14+15$
$16+17+18+19+20=21+22+23+24$
Yes, of course: for any $n \in \mathbb{N}$: $$ \sum_{k=n^2}^{n^2+n}k = \dfrac{(n+1)(2n^2+n)}{2} = \dfrac{(n+1)n(2n+1)}{2};\tag{1} $$ and $$ \sum_{k=n^2+n+1}^{n^2+2n}k = \dfrac{n(2n^2+3n+1)}{2} = \dfrac{n(2n+1)(n+1)}{2}.\tag{2} $$
RHS-sof $(1)$ and $(2)$ are equal.
Therefore one can write more generally: $$ \sum_{k=n^2}^{n^2+n}k = \sum_{k=n^2+n+1}^{n^2+2n}k, $$ or $$ n^2+(n^2+1)+\ldots+(n^2+n) = (n^2+n+1)+(n^2+n+2)+\ldots + (n^2+2n). $$