Thursday 8 December 2022

Sums of Squares Pattern

I watched an interesting video that describes a pattern involving sums of squares. The property can be stated as follows:$$n^2+(n+1)^2+n^2 \cdot (n+1)^2 =(n \cdot (n+1)+1)^2\\ \text{where both sides are equal to } n^4 + 2n^3 + 3n^2 + 2n + 1$$The author of the video arrives at the pattern by considering specific numerical examples and doesn't look at the underlying algebra.

The pattern is more meaningful when we look at some specific examples:$$ \begin{align} 1^2+2^2+2^2&=3^2\\2^2+3^2+6^2&=7^2\\3^2+4^2+12^2&=13^2\\4^2+5^2+20^2&=21^2\\5^2+6^2+30^2&=31^2 \end{align}$$Looking at this property the other way, we can say that for any integer \(a\):$$a^2=(a-1)^2+x^2+(x+1)^2$$where \(x\) is an integer such that \(x \cdot (x+1)=a-1\) if such integers exist, which of course will not often be the cause.

However, number of the form \(x \cdot (x+1) \) are pronic and members of OEIS A002378:


 A002378



Oblong (or promic, pronic, or heteromecic) numbers: \(a(n) = n \cdot (n+1) \).   
              

0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462, 506, 552, 600, 650, 702, 756, 812, 870, 930, 992, 1056, 1122, 1190, 1260, 1332, 1406, 1482, 1560, 1640, 1722, 1806, 1892, 1980, 2070, 2162, 2256, 2352, 2450, 2550, ...

Thus for every number that is one more than a pronic number, there will always be an integer value of \(x\) to satisfy \(a^2=(a-1)^2+x^2+(x+1)^2\). Looking at the list of pronic numbers above, let's take 2550 as an example. We will then have:$$ \begin{align} 2551^2&=2550^2+x^2+(x+1)^2\\x^2+(x+1)^2+2550^2-2551^2 &=0\\x^2+x^2+2x+1 +5101 \cdot (-1) &=0\\2x^2+2x-5100 &=0\\(2x-100)(x+51) &=0 \\x&=50 \text{ or }-51\end{align}$$Thus, choosing the positive solution, we have \(2551^2=2550^2+51^2+50^2\).

Of course, only numbers that are not equal to 7 mod 8 can be represented as a sum of three squares and we find that \( 2551^2 \! \! \mod 8 \equiv 1\). In fact, this value of 1 holds for all such square numbers whose square roots are one more than a pronic number. Thus we can say that if \(n\) is a pronic number then  \( (n+1)^2 \! \! \mod 8 \equiv 1\). 

There's nothing earth shattering in these observations. The connection with pronic numbers caught my attention after watching the video and I thought I'd follow up on it. Of course, numbers like \(2551^2=6507601\) can be expressed as a sum of three squares in probably thousands of ways and the pattern described earlier is just one these.

No comments:

Post a Comment