Proof of a discovery involving the square of whole numbers It was probably discovered by someone else but:
When you take the square of a non-zero whole number the sum of the numbers digit is always equal to $1,4,7,9$
How can I write a mathematical proof of that?

This is the base $9$ equivalent of all the squares ending in $0,1,4,5,6,9$ base $10$ because the "digital root" you are calculating is also the remainder on dividing by $9$.
This works in turn because any power of $10$ leaves remainder $1$ when it is divided by $9$ ($10^r=\dots 999+1$ where there are $r$ nines).
It is a nice thing to notice and explore. So I'm including some suggestions.
You might want to find out about the remainders of squares to other moduli (bases). $8$ is a surprising one, and well worth knowing (can you spot the pattern and prove it). And you could see what happens with prime numbers too. The key concept here is "quadratic residue".

Note that $(3r\pm 1)^2=3(3r^2\pm 2r)+1$ leaves remainder $1$ on division by $3$ and that $(3r)^2=9r^2$ is divisible by $9$.
Just as any integer can be odd or even, every integer is either a multiple of $3$ or one more or one less than a multiple of $3$. So every square leaves remainder $1$ on division by $3$ or $0$ (equivalent to $9$) on division by $9$ - and these are just the ones you have picked out.
