Sum of squares function explained

In number theory, the sum of squares function is an arithmetic function that gives the number of representations for a given positive integer as the sum of squares, where representations that differ only in the order of the summands or in the signs of the numbers being squared are counted as different. It is denoted by .

Definition

The function is defined as

rk(n)=|\{(a1,a2,\ldots,ak)\inZk:n=

2
a
1

+

2
a
2

++

2\}|
a
k

where

||

denotes the cardinality of a set. In other words, is the number of ways can be written as a sum of squares.

For example,

r2(1)=4

since

1=02+(\pm1)2=(\pm1)2+02

where each sum has two sign combinations, and also

r2(2)=4

since

2=(\pm1)2+(\pm1)2

with four sign combinations. On the other hand,

r2(3)=0

because there is no way to represent 3 as a sum of two squares.

Formulae

k = 2

See main article: Sum of two squares theorem. The number of ways to write a natural number as sum of two squares is given by . It is given explicitly by

r2(n)=4(d1(n)-d3(n))

where is the number of divisors of which are congruent to 1 modulo 4 and is the number of divisors of which are congruent to 3 modulo 4. Using sums, the expression can be written as:

r2(n)=4\sumd(-1)(d-1)/2

The prime factorization

n=2g

f1
p
1
f2
p
2

h1
q
1
h2
q
2

, where

pi

are the prime factors of the form

pi\equiv1\pmod4,

and

qi

are the prime factors of the form

qi\equiv3\pmod4

gives another formula

r2(n)=4(f1+1)(f2+1)

, if all exponents

h1,h2,

are even. If one or more

hi

are odd, then

r2(n)=0

.

k = 3

See also: Legendre's three-square theorem. Gauss proved that for a squarefree number,

r3(n)=\begin{cases} 24h(-n),&ifn\equiv3\pmod{8},\\ 0&ifn\equiv7\pmod{8},\\ 12h(-4n)&otherwise, \end{cases}

where denotes the class number of an integer .

There exist extensions of Gauss' formula to arbitrary integer .[1] [2]

k = 4

See main article: Jacobi's four-square theorem. The number of ways to represent 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.

r4(n)=8\sumd\midn, 4\nmiddd.

Representing, where m is an odd integer, one can express

r4(n)

in terms of the divisor function as follows:

r4(n)=8\sigma(2min\{k,1\

}m).

k = 6

The number of ways to represent as the sum of six squares is given by

r6(n)=4\sumd\midd2(4\left(\tfrac{-4}{n/d}\right)-\left(\tfrac{-4}{d}\right)),

where

\left(\tfrac{}{}\right)

is the Kronecker symbol.[3]

k = 8

Jacobi also found an explicit formula for the case :[3]

r8(n)=16\sumd\midn(-1)n+dd3.

Generating function

rk(n)

for fixed can be expressed in terms of the Jacobi theta function:[4]

\vartheta(0;q)k=

k(q)
\vartheta
3

=

infty
\sum
n=0
n,
r
k(n)q

where

\vartheta(0;q)=

infty
\sum
n=-infty
n2
q

=1+2q+2q4+2q9+2q16+.

Numerical values

The first 30 values for

rk(n),k=1,...,8

are listed in the table below:
n = r1(n)r2(n)r3(n)r4(n)r5(n)r6(n)r7(n)r8(n)
0style='text-align:center;'011111111
1style='text-align:center;'1246810121416
2style='text-align:center;'2041224406084112
3style='text-align:center;'30083280160280448
4style='text-align:center;'2224624902525741136
5style='text-align:center;'50824481123128402016
6style='text-align:center;'2×300249624054412883136
7style='text-align:center;'70006432096023685504
8style='text-align:center;'23041224200102034449328
9style='text-align:center;'322430104250876354212112
10style='text-align:center;'2×508241445601560442414112
11style='text-align:center;'110024965602400756021312
12style='text-align:center;'22×3008964002080924031808
13style='text-align:center;'1308241125602040845635168
14style='text-align:center;'2×7004819280032641108838528
15style='text-align:center;'3×500019296041601657656448
16style='text-align:center;'242462473040921849474864
17style='text-align:center;'17084814448034801780878624
18style='text-align:center;'2×320436312124043801974084784
19style='text-align:center;'1900241601520720027720109760
20style='text-align:center;'22×50824144752655234440143136
21style='text-align:center;'3×700482561120460829456154112
22style='text-align:center;'2×1100242881840816031304149184
23style='text-align:center;'2300019216001056049728194688
24style='text-align:center;'23×30024961200822452808261184
25style='text-align:center;'52212302481210781243414252016
26style='text-align:center;'2×13087233620001020052248246176
27style='text-align:center;'33003232022401312068320327040
28style='text-align:center;'22×700019216001248074048390784
29style='text-align:center;'29087224016801010468376390240
30style='text-align:center;'2×3×5004857627201414471120395136

See also

Notes and References

  1. P. T. Bateman . On the Representation of a Number as the Sum of Three Squares . Trans. Amer. Math. Soc. . 71 . 1951 . 70–101 . 10.1090/S0002-9947-1951-0042438-4 .
  2. S. Bhargava . Chandrashekar Adiga . D. D. Somashekara . Three-Square Theorem as an Application of Andrews' Identity . Fibonacci Quart . 1993 . 31 . 2 . 129–133 .
  3. Book: Cohen, H. . Henri_Cohen_(number_theorist) . Number Theory Volume I: Tools and Diophantine Equations . 5.4 Consequences of the Hasse–Minkowski Theorem . 2007 . Springer . 978-0-387-49922-2.
  4. Book: Milne . Stephen C. . Infinite Families of Exact Sums of Squares Formulas, Jacobi Elliptic Functions, Continued Fractions, and Schur Functions . Springer Science & Business Media . Introduction . 2002 . 1402004915 . 9.