Jump to content

Sum of squares function

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wolfk.wk (talk | contribs) at 18:37, 19 August 2018 (Definition: example). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The sum of squares 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. In other words, rk(n) is the number of ways n can be written as a sum of k squares.

For example, , since , where every sum has 2 sign combinations, and also , since with 4 sign combinations. On the other hand is , because there exists no way to represent 3 as a sum of two squares.

The first 20 values of rk
n r1(n) r2(n) r3(n) r4(n) r5(n) r6(n) r7(n) r8(n)
0 1 1 1 1 1 1 1 1
1 2 4 6 8 10 12 14 16
2 0 4 12 24 40 60 84 112
3 0 0 8 32 80 160 280 448
4 2 4 6 24 90 252 574 1136
5 0 8 24 48 112 312 840 2016
6 0 0 24 96 240 544 1288 3136
7 0 0 0 64 320 960 2368 5504
8 0 4 12 24 200 1020 3444 9328
9 2 4 30 104 250 876 3542 12112
10 0 8 24 144 560 1560 4424 14112
11 0 0 24 96 560 2400 7560 21312
12 0 0 8 96 400 2080 9240 31808
13 0 8 24 112 560 2040 8456 35168
14 0 0 48 192 800 3264 11088 38528
15 0 0 0 192 960 4160 16576 56448
16 2 4 6 24 730 4092 18494 74864
17 0 8 48 144 480 3480 17808 78624
18 0 4 36 312 1240 4380 19740 84784
19 0 0 24 160 1520 7200 27720 109760

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. Using sums, the expression can be written as:

The number of ways to represent n as the sum of four squares was due to Carl Gustav Jakob Jacobi and it is eight times the sum of all its divisors which are not divisible by 4, i.e.

Jacobi also found an explicit formula for the case k=8:

The generating series that gives the coefficients of the general form is based in terms of Jacobi theta function:[1]

where

See also

References

  1. ^ Milne, Stephen C. (2002). "Introduction". Infinite Families of Exact Sums of Squares Formulas, Jacobi Elliptic Functions, Continued Fractions, and Schur Functions. Springer Science & Business Media. p. 9. ISBN 1402004915.