4 ms·
I like your proof better! Much simpler to read. The if part confused me a bit, though k = m + 1 P = m * (m + 2) = (k-1) * (k+1) = k^2
by arh68 12y ago
I like your proof better! Much simpler to read. The if part confused me a bit, though
k = m + 1
P = m * (m + 2)
= (k-1) * (k+1)
= k^2 - 1
- jonsen 12y agoThe if part is meant to illustrate the idea, that if P is not a perfect square, then (m+1)^2 will give the nearest perfect square.