For a quadratic of the form px^2 + 40x + 16 to be a perfect square, it must be able to be written in the form (mx + n)^2 for some real numbers m and n.
Expanding (mx + n)^2 gives:
(mx + n)^2 = m^2x^2 + 2mnx + n^2
Comparing this to the given quadratic, we can see that:
m^2 = p
2mn = 40
n^2 = 16
Solving for m and n, we find that:
m = ±√p
n = ±4
Therefore, in order for the quadratic to be a perfect square, the square root of p must be rational, and the value of p must be one of the following:
p = 0, 1, 16
So the possible values of p that make the quadratic a perfect square are 0, 1, 16.