# 三角平方數

${\displaystyle N_{k}={1 \over 32}\left[\left(1+{\sqrt {2}}\right)^{2k}-\left(1-{\sqrt {2}}\right)^{2k}\right]^{2}}$

${\displaystyle {\frac {n(n-1)}{2}}=m^{2}}$
${\displaystyle n(n-1)=2m^{2}}$
${\displaystyle n^{2}-n+{\frac {1}{4}}=2m^{2}+{\frac {1}{4}}}$
${\displaystyle 4n^{2}-4n+1=8m^{2}+1}$
${\displaystyle (2n-1)^{2}=8m^{2}+1}$

${\displaystyle k=2n-1}$${\displaystyle p=2m}$，代入之，得方程${\displaystyle k^{2}=2p^{2}+1}$

${\displaystyle k}$個三角平方數${\displaystyle N}$等於第${\displaystyle s}$個平方數及第${\displaystyle t}$個三角形數，它們的關係為

${\displaystyle s(N)={\sqrt {N}}}$
${\displaystyle t(N)=\lfloor {\sqrt {2N}}\rfloor }$

${\displaystyle t}$可以由下面的方式得出：

${\displaystyle t(N_{k})={1 \over 4}\left\{\left[\left(1+{\sqrt {2}}\right)^{k}+\left(1-{\sqrt {2}}\right)^{k}\right]^{2}-\left[1+(-1)^{k}\right]^{2}\right\}}$

${\displaystyle N}$亦可用遞歸的方式求得：

${\displaystyle N_{0}=0}$
${\displaystyle N_{1}=1}$
${\displaystyle N_{k}=34N_{k-1}-N_{k-2}+2}$

${\displaystyle k}$越大，${\displaystyle {\tfrac {t}{s}}}$就會趨近${\displaystyle {\sqrt {2}}}$

${\displaystyle {\begin{matrix}N=1&s=1&t=1&{\frac {t}{s}}=1\\N=36&s=6&t=8&{\frac {t}{s}}=1.3333333\\N=1225&s=35&t=49&{\frac {t}{s}}=1.4\\N=41616&s=204&t=288&{\frac {t}{s}}=1.4117647\\N=1,413,721&s=1189&t=1681&{\frac {t}{s}}=1.4137931\\N=48,024,900&s=6930&t=9800&{\frac {t}{s}}=1.4141414\\N=1,631,432,881&s=40391&t=57121&{\frac {t}{s}}=1.4142011\end{matrix}}}$