# Does this pattern of summing polygonal numbers to get a square repeat indefinitely?

I am using the table of polygonal numbers on this site:

The first row of the table gives the value of $$n=0,1,2,3,...$$. The first column gives the polygonal numbers $$P_{N}(n)$$ starting with $$N=3$$.

Here's the pattern, the sum is done by adding elements of the same column starting with the triangular numbers.
$$1+1+1+1=4=2^2$$ $$3+4+5+6+7=25=5^2$$ $$6+9+12+15+18+21=81=9^2$$ $$10+16+22+28+34+40+46=196=14^2$$ ... The squares on the right hand side are given by $$n+T_{n}$$. The sum of index $$(n+1)$$ has one more element than that of $$n$$.

1-Does this pattern repeat indefinitely? (I suspect the answer is yes but I can't prove it)
2-Do we know why we have such a pattern?

Edit 03-05-2019

Following the suggestion of Eleven-Eleven, I looked for other patterns similar to the one above. I found one that is even simpler. This time we skip the triangular numbers when we calculate the sum. We start with the squares and sum up enough terms to get another square.

$$1=1^2=T_{1}^2$$ $$4+5=3^2=9=T_{2}^2$$ $$9+12+15=6^2=36=T_{3}^2$$ $$16+22+28+34=10^2=100=T_{4}^2$$ $$25+35+45+55+65=15^2=225=T_{5}^2$$

We see the same pattern as above. The square with index $$(n+1)$$ requires the addition of one more term than the square with index $$n$$. The number of elements to sum up to get the square $$T_{n}^2$$ is simply $$n$$.

Can this be stated as the following theorem?

The square of a triangular number $$T_{n}$$ can be expressed as the sum of $$n$$ polygonal numbers excluding the triangular number itself.

Let the first term be a triangular number $$n(n+1)/2$$, the common difference between successive terms be $$n(n-1)/2$$, and the number of terms be $$n+3$$. Then the average of all terms is

$$\dfrac{n(n+1)}{2}+\dfrac{n+2}{2}×\dfrac{n(n-1)}{2}=\dfrac{n^2(n+3)}{4}$$

Multiplying this by the number of terms $$n+3$$ then gives a sum of $$(n(n+3)/2)^2$$.

• so this pattern is just a property of the triangular numbers though we are summing over polygonal numbers (including of course the triangular number). – user25406 Mar 3 at 20:02
• Yes. Polygonal numbers with a different polygon but the same order (e.g. triangular of 3, square of 3, pentagonal of 3, etc) form an arithmetic sequence with a triangular number difference. – Oscar Lanzi Mar 3 at 20:07
• Oscar, can you please comment on the edit regarding the new pattern? – user25406 Mar 5 at 13:18
• At work, no time now. Need to wait till evening. – Oscar Lanzi Mar 5 at 13:25

This is a much more drawn out approach using summations. It doesn't have the elegance of Oscar's solutions, but it still works. You have that with $$T_k$$ being the $$k$$-th Triangular number (here $$T_0=0$$)

$$\sum_{k=1}^{4+0}{[T_1+(k-1)T_0]}=(T_1+1)^2$$

$$\sum_{k=1}^{4+1}{[T_2+(k-1)T_1]}=(T_2+2)^2$$

$$\sum_{k=0}^{4+2}{[T_3+(k-1)T_2]}=(T_3+3)^2$$

This suggests that

$$\sum_{k=1}^{m+4}{[T_{m+1}+(k-1)T_{m}]}=(T_{m+1}+(m+1))^2$$

Since summation is linear, we have

$$\begin{eqnarray*}\sum_{k=1}^{m+4}{[T_m+(k-1)kT_{m-1}]}&=&T_{m+1}\sum_{k=1}^{m+4}1+T_m\sum_{k=1}^{m+4}{(k-1)}\\&=&T_{m+1}(m+4)+T_m\sum_{k=1}^{m+3}{k} \end{eqnarray*}$$

Using the formula for the $$m$$-th Triangular number, we have

$$=\left[\frac{(m+1)(m+2)}{2}\right](m+4)+\left[\frac{m(m+1)}{2}\right]\left[\frac{(m+3)(m+4)}{2}\right]$$

Factoring and simplifying gives

$$\frac{(m+1)(m+4)}{2}\left[(m+2)+\frac{m(m+3)}{2}\right]=\frac{(m+1)^2(m+4)^2}{4}$$

Now, the right hand side

$$\begin{eqnarray*}[T_{m+1}+(m+1)]^2&=&T_{m+1}^2+2(m+1)T_{m+1}+(m+1)^2\\&=&\frac{(m+1)^2(m+2)^2}{4}+2(m+1)^2\frac{(m+2)}{2}+(m+1)^2 \end{eqnarray*}$$

Factoring out an $$(m+1)^2$$,

$$\begin{eqnarray*}\frac{(m+1)^2(m+2)^2}{4}+2(m+1)^2\frac{(m+2)}{2}+(m+1)^2&=&(m+1)^2\left[\frac{(m+2)^2}{4}+\frac{4(m+2)}{4}+\frac{4}{4}\right]\\&=&\frac{(m+1)^2}{4}\left[(m^2+4m+4)+(4m+8)+4\right]\\&=&\frac{(m+1)^2}{4}(m^2+8m+16)\\&=&\frac{(m+1)^2(m+4)^2}{4} \end{eqnarray*}$$

Since both expressions equal $$\frac{(m+1)^2(m+4)^2}{4}$$, we are done.

EDIT:

For the new problem, note the first term in each line is a successive square and as above, the common difference is a triangular number. Thus we have to prove, in general,

$$\sum_{k=1}^n[n^2+(k-1)T_{n-1}]=T_n^2$$

The left hand side then can be written as

$$\begin{eqnarray*}\sum_{k=1}^n[n^2+(k-1)T_{n-1}]&=&\sum_{k=1}^n n^2+T_{n-1}\sum_{k=1}^n(k-1)\\&=&n^3+T_{n-1}\sum_{k=1}^{n-1}k\\&=&n^3+\frac{(n-1)n}{2}\cdot\frac{(n-1)n}{2}\\&=&n^2\left(n+\frac{(n-1)^2}{2^2}\right)\\&=&\frac{n^2}{2^2}(n+1)^2\\&=&\left[\frac{n(n+1)}{2}\right]^2\\&=&T_n^2 \end{eqnarray*}$$

And we're done.

• These types of patterns are not unique to triangular numbers, they pop up a bit. For example, $$1=1^3$$ $$3+5=2^3$$ $$7+9+11=3^3$$ $$13+15+17+19=4^3$$ I can see if there is a link to other problems like this... – Eleven-Eleven Mar 3 at 21:01
• Eleven-Eleven, I wouldn't know where to start. I am not a professional mathematician. It's one thing to find a pattern but it's a completely different thing to codify it in a theorem. Not having the necessary mathematical background, I just don't know where to start and how to go about it. – user25406 Mar 5 at 19:59
• I addressed your edit. – Eleven-Eleven Mar 6 at 14:01
• Eleven-Eleven, thank you very much. I truly appreciate what you did. If I understood what you did in your edit, the first equation is a sum over $(n^2 +(k-1)T_{n-1})$. You did not sum over polygonal numbers though we are doing precisely that. And that's the thing I could not figure out. I finally realized that any given column can be considered as an arithmetic progression of $T_{n}$. – user25406 Mar 6 at 14:55
• I added another answer below strictly in terms of summing over polygonal numbers. Check it out. – Eleven-Eleven Mar 8 at 13:14

I'm adding another answer because I wanted to try and use the formula for polygonal numbers as given here in an attempt to better answer the original question by the OP. In both cases above we exploited the arithmetical sequence properties and only used Triangular numbers. Can we get the same result strictly using the polygonal number formula

$$P(s,n)=\frac{n^2(s-2)-n(s-4)}{2}$$

where $$n$$ represents the sequence number and $$s$$ represents the number of sides in a polygonal number. So, lets look at an example. In the second row, the OP has that

$$3+4+5+6+7=25=(T_2+2)^2$$

Well, $$3,4,5,6,$$ and $$7$$ are the second triangular, square, pentagonal, hexagonal, and heptagonal numbers, so $$n=2$$ and $$s$$ is indexed... therefore, we have

$$\begin{eqnarray*}\sum_{k=1}^5{P(k+2,2)}&=&\sum_{k=1}^5{\left[\frac{4((k+2)-2)-2((k+2)-4)}{2}\right]}\\&=&\sum_{k=1}^5{\left[\frac{4k-2(k-2)}{2}\right]}\\&=&\sum_{k=1}^5\left(k+2\right)\\&=&\sum_{k=1}^5{k}\\&=&T_5 \end{eqnarray*}$$

Now, this can be generalized. The claim is

$$\sum_{k=1}^{m+3}{P((k+2),m)}=\left(T_m+m\right)^2$$

Proof:

$$\begin{eqnarray*}\sum_{k=1}^{m+3}{P((k+2),m)}&=&\sum_{k=1}^{m+3}\left[\frac{m^2((k+2)-2)-m((k+2)-4)}{2}\right]\\&=&\sum_{k=1}^{m+3}\left[\frac{m^2k-mk+2m}{2}\right]\\&=&\frac{m^2}{2}\sum_{k=1}^{m+3}{k}-\frac{m}{2}\sum_{k=1}^{m+3}{k}+m\sum_{k=1}^{m+3}1\\&=&\frac{(m-1)m}{2}\sum_{k=1}^{m+3}k+m(m+3)\\&=&\frac{(m-1)m}{2}\frac{(m+3)(m+4)}{2}+\frac{4m(m+3)}{4}\\&=&\frac{m(m+3)}{4}\left[(m-1)(m+4)+4\right]\\&=&\frac{m(m+3)}{4}\left(m^2+3m\right)\\&=&\frac{m^2(m+3)^2}{2^2}\\&=&\left[\frac{m(m+3)}{2}\right]^2\\&=&\left[\frac{m(m+1+2)}{2}\right]^2\\&=&\left[\frac{m(m+1)+2m}{2}\right]^2\\&=&\left(T_m+m\right)^2 \end{eqnarray*}$$

• fantastic. thank you for showing that the use of polygonal numbers themselves leads to the same result. – user25406 Mar 8 at 14:37
• I thought you'd appreciate that. That's why I answered again using the polygonal number formula. By the way, if you algebraically manipulate the polygonal number formula, it can be written as a Triangular number plus something. You can find that formula on the linked WIkipedia page, but for ease, here it is: – Eleven-Eleven Mar 8 at 14:58
• $$P(s,n)=(s-2)T_{n-1}+n$$ – Eleven-Eleven Mar 8 at 14:58