## Primitive Pythagorean triples with the odd leg a Pentagonal number

There are infinitely many primitive Pythagorean triples   $(a, b, c)$,   like   $(5, 12, 13)$,
with hypotenuse c such that the odd leg is a pentagonalnumber and the even leg is consecutive with the hypotenuse.

The odd leg a being the pentagonal number   $a_n = n \,(3 \,n - 1)/2$
The even leg   $b = 2 \,k$
The hypotenuse   $c = 2 \,k + 1$

The odd pentagonal numbers   $a_n$   can be partitioned into two sets by

$n = 2 + 4 \, p$   with   $p = 0, 1, 2,...$
$n = 5 + 4 \, m$   with   $m = 0, 1, 2,...$

If   $n = 2 + 4 \, p$,   then

$a_n = n \,(3 \, n - 1)/2 = (2 + 4 \, p)(3 \, (2 + 4 \, p) - 1)/2 = 24 \, p^2 + 22 \, p + 5$

$a^2 + b^2 = c^2$

$(24 \, p^2 + 22 \, p + 5)^2 + 4 \, k^2 = (2 \, k + 1)^2$
$(24 \, p^2 + 22 \, p + 5)^2 = (2 \, k + 1)^2 - 4 \, k^2$
$576 \,p^4 + 1056 \,p^3 + 724 \,p^2 + 220 \,p + 25 = 4 \, k + 1$

$k = 144 \, p^4 + 264 \, p^3 + 181 \, p^2 + 55 \, p + 6$

Since the equation has a positive integer solution for   $p = 0, 1, 2,...$
there are infinitely many Pythagorean triples of the desired form.

$a = 24 \, p^2 + 22 \, p + 5$
$b = 2 \,(144 \, p^4 + 264 \, p^3 + 181 \, p^2 + 55 \, p + 6)$
$c = 2 \,(144 \, p^4 + 264 \, p^3 + 181 \, p^2 + 55 \, p + 6) + 1$

Here are the first few Primitive triples:

$(5,12,13)$ ………………                $5 = P_2$
$(51,1300,1301)$ ………….          $51 = P_6$
$(145,10512,10513)$ ……….      $145 = P_{10}$
$(287,41184,41185)$ ……….      $287 = P_{14}$
$(477,113764,113765)$ ……..     $477 = P_{18}$
$(715,255612,255613)$ ……..     $715 = P_{22}$
$(1001,501000,501001)$ …….   $1001 = P_{26}$
$(1335,891112,891113)$ …….   $1335 = P_{30}$
$(1717,1474044,1474045)$ ….. $1717 = P_{34}$
$(2147,2304804,2304805)$ ….. $2147 = P_{38}$
$(2625,3445312,3445313)$ ….. $2625 = P_{42}$
……………………
……………………

If   $n = 5 + 4 \, m$,   then

$a_n = n \,(3 \, n - 1)/2 = (5 + 4 \, m)(3 \, (5 + 4 \, m) - 1)/2 = 24 \, m^2 + 58 \, m + 35$

$(24 \, m^2 + 58 \, m + 35)^2 = 4 \, k + 1$

$k = 144 \, m^4 + 696 \, m^3 + 1261 \, m^2 + 1015 \, m + 306$

there are infinitely many Pythagorean triples of the desired form.

$a = 24 \, m^2 + 58 \, m + 35$
$b = 2 \,(144 \, m^4 + 696 \, m^3 + 1261 \, m^2 + 1015 \, m + 306)$
$c = 2 \,(144 \, m^4 + 696 \, m^3 + 1261 \, m^2 + 1015 \, m + 306) + 1$

Here are the first few Primitive triples:

$(35,612,613)$ ……………          $35 = P_5$
$(117,6844,6845)$ …………       $117 = P_9$
$(247,30504,30505)$ ……….      $247 = P_{13}$
$(425,90312,90313)$ ……….      $425 = P_{17}$
$(651,211900,211901)$ ……..     $651 = P_{21}$
$(925,427812,427813)$ ……..     $925 = P_{25}$
$(1247,777504,777505)$ …….    $1247 = P_{29}$
$(1617,1307344,1307345)$ …..   $1617 = P_{33}$
$(2035,2070612,2070613)$ …..   $2035 = P_{37}$
$(2501,3127500,3127501)$ …..   $2501 = P_{41}$
$(3015,4545112,4545113)$ …..   $3015 = P_{45}$
………………
………………