This site is supported by donations to The OEIS Foundation.

# User:Daniel Poveda Parrilla

I'm here because I enjoy finding and creating formulas and integer sequences. I've always loved doing this for fun!

But to be honest, I've really ended up here because of one challenge that Matt Parker proposed in YouTube about square triangular numbers and the pattern that is behind them, so I think it's a good idea to share in my profile page everything I've found out.

## My inquiries about square triangular numbers

To make every expression clear, I am naming the sequences as following:

• A001110 as ${\displaystyle ST}$ (square triangular numbers):

${\displaystyle \ {0,1,36,1225,41616,1413721,48024900,1631432881,55420693056...}}$

• A002965 as ${\displaystyle B}$ (interleaved denominators, A000129, and numerators, A001333, of convergents to ${\displaystyle {\sqrt {2}}}$):

${\displaystyle \ {0,1,1,1,2,3,5,7,12,17,29,41,70,99,169,239...}}$

• A000290 as ${\displaystyle S}$ (square numbers):

${\displaystyle \ {0,1,4,9,16,25,36,49,64,81,100,121,144,169...}}$

• A000217 as ${\displaystyle T}$ (triangular numbers):

${\displaystyle \ {0,1,3,6,10,15,21,28,36,45,55,66,78,91,105...}}$

• A114620 as ${\displaystyle C}$ (2×A084158, twice Pell triangles):

${\displaystyle \ {0,2,10,60,348,2030,11830,68952,401880,2342330,13652098...}}$

• A235367 as ${\displaystyle D}$ (sum of positive even numbers up to ${\displaystyle n^{2}}$):

${\displaystyle \ {0,6,20,72,156,342,600,1056,1640,2550,3660,5256,7140,9702,12656,16512,20880...}}$

• A000129 as ${\displaystyle P}$ (Pell numbers), having that ${\displaystyle P_{n}}$ = ${\displaystyle B_{2n}}$:

${\displaystyle \ {0,1,2,5,12,29,70,169,408,985,2378,5741,13860,33461,80782,195025,470832,1136689...}}$

Given the equations of this problem:

${\displaystyle \ {ST_{n}=S_{i}=T_{j}}}$

I started my study knowing these expressions for square numbers and triangle numbers:

${\displaystyle \ {S_{i}={i}^{2}=\sum _{x=0}^{i-1}2x+1}}$

${\displaystyle \ {T_{j}={\frac {j(j+1)}{2}}=\sum _{x=0}^{j}x}}$

As each square number is a sum of consecutive odd numbers and each triangular number is a sum of consecutive numbers, I focused on the different elements in each sum, noticing that parity of triangular numbers is important and that there has to be a sum of consecutive odd numbers that equals a sum of consecutive even numbers:

${\displaystyle \ {{\sum _{x={\frac {j+(j{\bmod {2}})}{2}}}^{i-1}2x+1}=\sum _{x=0}^{\frac {j-(j{\bmod {2}})}{2}}2x}}$

Then I noticed that ${\displaystyle {\frac {j+(j{\bmod {2}})}{2}}}$ is a square number and it divides each corresponding square triangular number, resulting in another square number, so every square triangular number is a product of two square numbers. The result of each sum is a term of sequence ${\displaystyle D}$ and it can also be linked with sequence ${\displaystyle B}$:

${\displaystyle D_{k}=D_{B_{2n+1}}\mid {n>1}}$

Examples:

${\displaystyle \ {ST_{2}=S_{6}=T_{8}}=36={2}^{2}\cdot {3}^{2};{{\sum _{x={\frac {8+0}{2}}}^{6-1}2x+1}=\sum _{x=0}^{\frac {8-0}{2}}2x}=20=2\cdot T_{4-0}=D_{3}}$

${\displaystyle \ {ST_{3}=S_{35}=T_{49}}=1225={5}^{2}\cdot {7}^{2};{{\sum _{x={\frac {49+1}{2}}}^{35-1}2x+1}=\sum _{x=0}^{\frac {49-1}{2}}2x}=600=2\cdot T_{25-1}=D_{7}}$

${\displaystyle \ {ST_{4}=S_{204}=T_{288}}=41616={12}^{2}\cdot {17}^{2};{{\sum _{x={\frac {288+0}{2}}}^{204-1}2x+1}=\sum _{x=0}^{\frac {288-0}{2}}2x}=20880=2\cdot T_{144-0}=D_{17}}$

${\displaystyle \ {ST_{5}=S_{1189}=T_{1681}}=1413721={29}^{2}\cdot {41}^{2};{{\sum _{x={\frac {1681+1}{2}}}^{1189-1}2x+1}=\sum _{x=0}^{\frac {1681-1}{2}}2x}=706440=2\cdot T_{841-1}=D_{41}}$

I found a general term for a sequence ${\displaystyle A}$ similar to ${\displaystyle B}$, but not exactly equal:

${\displaystyle \ {0,1,1,2,3,5,7,12,17,29,41,70,99,169,239...}}$

I fixed this conditions for my sequence:

${\displaystyle \ A_{0}=0}$,

${\displaystyle \ A_{1}=1}$,

${\displaystyle \ A_{2}=1}$,

${\displaystyle \ m={(n-1){\bmod {2}}}}$.

The general term I found for this sequence is the following:

${\displaystyle \ {A_{n}=A_{n-1-m}+{2^{m}}\cdot A_{n-2-m}}\mid {n>2}}$

Here is a curiosity: ${\displaystyle A_{13}=13^{2}}$. I do not know if this happens with more terms of this sequence.

After all these inquiries, I got here and I found out sequence ${\displaystyle B}$ and that years ago Hugh Darwen linked ${\displaystyle ST}$ with it.

I linked sequences ${\displaystyle ST}$, ${\displaystyle S}$ and ${\displaystyle T}$ as well (square triangular numbers, square numbers and triangular numbers) with ${\displaystyle B}$ knowing the ${\displaystyle n}$th position of a square triangular number:

${\displaystyle \ {i=B_{2n}\cdot B_{2n+1}};{j=2(B_{2n})^{2}-(B_{2n}{\bmod {2}})}}$

${\displaystyle \ ST_{n}=S_{(B_{2n}\cdot B_{2n+1})}=T_{[2(B_{2n})^{2}-(B_{2n}{\bmod {2}})]}}$

${\displaystyle \ ST_{n}=(B_{2n}\cdot B_{2n+1})^{2}={\frac {[2(B_{2n})^{2}-(B_{2n}{\bmod {2}})]\cdot ([2(B_{2n})^{2}-(B_{2n}{\bmod {2}})]+1)}{2}}}$

I discovered these new patterns and formulas for square triangular numbers:

${\displaystyle \ {ST_{n}=(B_{2n})^{4}+\sum _{x=0}^{(B_{2n})^{2}-(B_{2n}{\bmod {2}})}2x}}$

This formula can be proved graphically, I guess this is valid for every square triangular number. For each square triangular number there is a square of squares in each corresponding triangle. Cutting, one level at a time, both acute angle corners, we're subtracting consecutive even numbers, ending up in a square of squares (it looks like kind of a Sierpiński square I think) with one of its corners being and not being part of the triangle's hypotenuse (depending on the parity of the triangular number, that's why I used modular arithmetic). To make this formula shorter, we can use terms of sequences ${\displaystyle B}$ and ${\displaystyle D}$. As with a sum of consecutive even numbers we can build two triangles, we can write a better formula using only Pell numbers and triangular numbers:

${\displaystyle \ {ST_{n}={B_{2n}}^{4}+D_{B_{2n+1}}}\mid {n>1}}$

${\displaystyle \ {ST_{n}={P_{n}}^{4}+2\cdot {T_{{P_{n}}^{2}-(P_{n}{\bmod {2}})}}}}$

This example is a graphical proof of this formula building a triangle with ${\displaystyle {ST_{3}}}$ elements:

Proof of this formula using number 1225.

As it has been already observed, there is a sum of consecutive odd numbers equivalent to that sum of consecutive even numbers and both of them can be expressed using terms of ${\displaystyle B}$ sequence knowing the ${\displaystyle n}$th position of a square triangular number in the sequence:

${\displaystyle \ {ST_{n}=(B_{2n})^{4}+\sum _{x=(B_{2n})^{2}}^{(B_{2n}\cdot B_{2n+1})-1}2x+1}\mid {n\neq 0}}$

Writing it this way, I have found a link with sequence ${\displaystyle C}$. Each ${\displaystyle C_{n}}$ is related to the sum of consecutive odd numbers that equals ${\displaystyle ST_{n+1}}$, and also it can be proved graphically. Concretely, ${\displaystyle C_{n}}$ is the number of last gnomons that we have to subtract to the square to get a smaller one formed by ${\displaystyle (B_{2(n+1)})^{4}}$ elements, the same Pell square of squares previously shown:

${\displaystyle \ C_{n}=(B_{2(n+1)}\cdot B_{2(n+1)+1})-(B_{2(n+1)})^{2}=B_{2(n+1)}\cdot (B_{2(n+1)+1}-B_{2(n+1)})}$

I linked ${\displaystyle ST}$ and all the patterns I detected with the sequence I found out in the first place (as I did not know ${\displaystyle B}$ in the beginning, it was later when I linked ${\displaystyle ST}$ and ${\displaystyle B}$ as I already showed), having ${\displaystyle B_{0}=A_{0}}$ and ${\displaystyle B_{n+1}=A_{n}}$ | ${\displaystyle n}$${\displaystyle 0}$.

${\displaystyle \ {ST_{0}=0}}$

${\displaystyle \ ST_{n}=S_{(A_{2n-1}\cdot A_{2n})}=T_{[2(A_{2n-1})^{2}-(A_{2n-1}{\bmod {2}})]}\mid {n\neq 0}}$

${\displaystyle \ ST_{n}=(A_{2n-1}\cdot A_{2n})^{2}={\frac {[2(A_{2n-1})^{2}-(A_{2n-1}{\bmod {2}})]\cdot ([2(A_{2n-1})^{2}-(A_{2n-1}{\bmod {2}})]+1)}{2}}\mid {n\neq 0}}$

${\displaystyle \ {ST_{n}=(A_{2n-1})^{4}+\sum _{x=0}^{(A_{2n-1})^{2}-(A_{2n-1}{\bmod {2}})}2x}\mid {n\neq 0}}$

${\displaystyle \ {ST_{n}=(A_{2n-1})^{4}+\sum _{x=(A_{2n-1})^{2}}^{(A_{2n-1}\cdot A_{2n})-1}2x+1}\mid {n\neq 0}}$

${\displaystyle \ {ST_{n}=(A_{2n-1})^{4}+D_{A_{2n}}}\mid {n>2}}$

Later (Jul 30 2016) I generalized this pattern to create a new sequence, each number being triangular formed by a square of squares and two small triangles:

${\displaystyle \ {A275496_{n}=n^{4}+\sum _{x=0}^{n^{2}-(n{\bmod {2}})}2x={n}^{4}+2\cdot {T_{{n}^{2}-(n{\bmod {2}})}}}}$

After that, I felt like looking for more triangles built following this pattern, so I generalized it a bit more (next sequence still has not been approved):

${\displaystyle \ {A276914_{n}=n^{2}+\sum _{x=0}^{A052928_{n}}2x={n}^{2}+2\cdot {T_{A052928_{n}}}}}$

And... that is all for now. Some things are missing, I have to complete this page.