Sum of squares function
Appearance
The sum of square function is an arithmetic function that gives the number of representations for a given positive integer n as the sum of k squares, where representations that differ only in the order of the summands or in the signs of the square roots are counted as different and is denoted by rk(n).
Definition
The function is defined as
where |.| denotes the cardinality of the set.
Particular cases
The number of ways to write a natural number as sum of two squares is given by r2(n). It is given explicitly by
where d1(n) is the number of divisors of n which are congruent with 1 modulo 4 and d3(n) is the number of divisors of n which are congruent with 3 modulo 4.