Primes may be divided in to sets: $p=4n\pm1$. Gauss showed, that if $p=4n+1$, it may be written also as $p=a^2+b^2$. From LagrangesFour-SquareTheorem, we know
that $g(2)=4$, where 4 may be reduced to 3 except for numbers of the form $4^n(8k+7)$,... (every rational integer is the sum of a fixed number $g(n)$ of $n$th powers of positive integers)
So prime numbers split in $3$ cases:
- $p=4n+1=a^2+b^2$, e.g. $5=4+1=1^2+2^2$,
- $p=8n+3=a^2+b^2+c^2$, e.g. $11=8+3=9^2+1^2+1^2$
- $p=8n+7=a^2+b^2+c^2+d^2$, e.g. $7=2^2+1^2+1^2+1^2$.
How large is the fraction of every case among all primes?
I don't remember where, but I think I once read that the truth of Riemann's hypothesis has an influence on the $4n\pm1$ distribution.
EDIT2 A discussion of the error terms is appreciated.
EDIT It seems possible to write every natural number and therefore every prime as a product of conjugate quaternions $(a\pm ib\pm jc \pm kd)(a\mp ib\mp jc\mp kd)$.