let n = the number
so from the problem we get:
n + n² = 4n
subtract n from each side
n² = 3n
get both n's on the same side of the equation
n² - 3n = 0
now factor
n(n - 3) = 0
n = 0 or n = 3
If 0 is considered a whole number, there are two solutions: n = 0 and n = 3.
If not, the only solution is n = 3
since you asked for the number, we will assume 3 is the only answer