>>11762516Not the OP, but desired to carve an intuitive path as to how one would arrive at this result.
We are concerned with the transformation of :
n^2 + 2np
For prime p and natural n.
Into a form (g(p))^2, where g(p) is a rational polynomial of prime natural variables.
One may see immediately that supposing n is even yields :
n = 2k
Leading to :
(2k)^2 + 2p (2k) = 4 ( k^2 + pk )
Further factoring delivers :
4k (k + p)
Now the question is how may we define k in terms of p such that it delivers the desired form.
Note that because k is external to (k+p) and we desire a square, k itself must be a square of some p polynomial.
Also (k+p) must be processed via k's form such that it is also a square.
Simplicity dictates the further steps.
Recall the Pascal Triangle and it's relations to polynomials of the form (x+1)^m or (x-1)^m for natural m.
1 is chosen because it identitively maintains the magnitude of binomial coefficients which emerge. Again, think simply.
Look upon the Triangle and see where one may alter between (x-1)^m and (x+1)^m with just a multiple of 'x'.
This is only possible between (x-1)^2 and (x+1)^2 as :
(x+1)^2 - (x-1)^2 = (x^2 - x^2) + (2x + 2x) + (1-1) = 4x
Clearly establishing that :
(x+1)^2 = 4x + (x-1)^2
But note the 4. Divide both sides by 4 to eliminate approriately, and you end up with the desired form in terms of 'x'. Translate back to in terms of 'p' and you have your result :
k = (p-1)^2 /4
Which produces :
4 (1/4) (1/4) (p-1)^2 (p+1)^2 = (1/2)^2 ( (p-1)(p+1) )^2
Which cascades back to prior definition, delivering :
n = 2 ( (1/2) (p-1) (p+1) )^2
Again, at least for me, the series of steps to arrive at this are majority-based on intuition. To think of the evens is to notice the symmetry presented by the 2's. To think of k being the square of some p polynomial is a combination of algebraic position and desired form. The rest is a practice in simplicity and translation by looking at the coefficients.