Q:

The numbers that can be written as the sum of squares of two **natural** numbers

It's easy to solve for sum of two squares.but it becomes hard when we want numbers that can written as sum of squares of two natural number.For example given number $n$ can be written as the sum of two natural numbers if...
My Attempt:I see that which numbers don't follow the condition I saw that some of squares don't follow that for example 9 or 16 but some of them follow that for example 25.

A:

It's well known which numbers can be written as sum of two squares of two integers, wlog nonnegative integers. 
If you want to restrict yourself to sum of two positive integers, then you just would like to check numbers of the form $n^2+0^2$, i.e. squares, which cannot be written as sum of two positive squares. In other words, you want to find all squares $a^2$ which cannot be written as $b^2+c^2$, for some positive integer $b,c$. Equivalently, you want to check all Pitagorean triple and, again, the parametric form of all Pitagorean triplets $(a,b,c)$ are well known.
Then, all the positive integers $n$ which can be written as sum of two positive squares are those satisfying:
(i) if $n$ is not a squares and $p\equiv 3\pmod{4}$ divides $n$ then the $p$-adic valuation of $n$ is even;
(ii) if $n$ is a square, then it has to be of the form $k(a^2+b^2)$, for some positive integers $k,a,b$.
The second condition (ii) states that $n^2$ is sum of two positive squares if and only if there exists a divisor of $n$ which is a sum of two positive squares. Now, if that divisor is not a squares itself, then you can use again condition (i).

