Which integers are the sum of $k$ positive squares?

70 Views Asked by At

For each $k$, is there something we can say about each positive integer being able to be written as a sum of $k$ positive squares? What is known for $k > 5$? What about if we only care about whether a prime can be written as a sum of $k$ positive squares for each given $k$?

During my investigation, I found a lot of results.

For $k=2$, a simple test on the prime factors and exponentes can be made, which can be seen in the "FORMULA" section of this OEIS page.

For $k=3$, it seems that no definitive rule has been found, but there are some interesting facts in this OEIS page

For $k=4$, I have found very few information in the OEIS page

For $k=5$, even less information is found in the OEIS page

I have also found this interesting OEIS page about sums of squares.

So what about $k > 5$? Is there anything interesting about the sum of $k$ positive squares? And what if we restrict ourselves to primes?