We know that, `1+3+5+"..."+(2n-1)=n^(2)`
Thus, the given equation can be written as
`((p+1)/(2))^(2)+((q+1)/(2))^(2)=((r+1)/(2))^(2)`
`implies (p+1)^(2)+(p+1)^(2)=(r+1)^(2)`
Therefore, `(p+1, q+1, r+1)` from a Pythagorean triplet as `pgt6 implies p+1gt7`
The first Pytgagorea triplet containing a numbet gt7 is `(6,8,10).`
`implies p+1=8, q+1=6, r+1=10`
`implies p+q+r=21`