It is known that every positive integer can be written as sum of three squares if and only if the number cannot be expressed as $4^n(8k+7)$ for any non negative integers $n$, $k$ (Legendre's three squares theorem).
I have read about the function $r_3(n)$, which is the number of integer solutions to the equation: $$x^2+y^2+z^2=n$$ for every positive integer $n$. However this includes $0$ and negative solutions so I am finding a formula of $r'_3(n)$, that is the number of positive integer solutions to the equation: $$x^2+y^2+z^2=n$$ without arranging $(x,y,z)$.
So my question is: are there any elementary formula of this $r'_3(n)$ ?
Also, does there exist an integer $a<10^9$ that can be written as sum of three positive square numbers in at least $1000$ different ways without arrangement?. If not, how can we prove it?
(Sorry, English is my second language)
Do you know the formulas for $r_3\left(n\right)$ and $r_2\left(n\right)$? These can easily be found online (see the link lower down in my answer). Then you can compute your $r'_3\left(n\right)$ by simple counting arguments. Begin with the $r_3\left(n\right)$ expressions of $n$ as the sum of three squares. Subtract $6\left(r_2\left(n\right) - r_1\left(n\right) - r_1\left(\frac{n}{2}\right)\right)$ (define $r_1\left(\frac{n}{2}\right) = 0$ if $n$ is odd of course). This subtraction corresponds to getting rid of each expression of $n$ as the sum of the squares of two distinct integers plus zero squared - do you see why? Then finally subtract $3r_1\left(\frac{n}{2}\right) + 3r_1\left(n\right)$ for each expression of $n$ as two of the same square and each expression of $n$ as a square. So I think $$r'_3\left(n\right) = \frac{1}{8}\left(r_3\left(n\right) - 6r_2\left(n\right) + 3\left(r_1\left(n\right) + r_1\left(\frac{n}{2}\right)\right)\right).$$ The division by $8$ here makes sense since the expression in the brackets corresponds to solutions with all variables non-zero, and each solution in positive integers corresponds to exactly $8$ solutions in non-zero integers. I'm using $r_1$ instead of a more familiar symbol for (double) the characteristic function of the squares to indicate the nested nature of these sums of squares.
Now, I'm not totally confident in my combinatorics here, but my point is that reducing from $r_3\left(n\right)$ to $r'_3\left(n\right)$ doesn't count on any deep mathematics. However, the formula for $r_3\left(n\right)$ does. If you haven't seen it already, check out the info on this page:
http://mathworld.wolfram.com/SumofSquaresFunction.html
As far as your second question, I'm not sure. There are lower bounds satisfied by infinitely many $n \in \mathbb{N}$, but to achieve a large value under $10^9$, they won't help, as I don't think the infinite set of such $n$ satisfying these lower bounds is explicit.