Is there a formula for this string of numbers?

76 Views Asked by At

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$

2

There are 2 best solutions below

0
On

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). $$

0
On

$$\sum_{k=0}^n(n^2+k)=(n+1)n^2+\sum_{k=0}^nk=n(n^2+n)+\sum_{k=1}^nk=\sum_{k=1}^n(n^2+n+k)$$