Sum of squares function

Last updated

In number theory, 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 numbers being squared are counted as different. It is denoted by rk(n).

Contents

Definition

The function is defined as

where denotes the cardinality of a 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 each sum has two sign combinations, and also since with four sign combinations. On the other hand, because there is no way to represent 3 as a sum of two squares.

Formulae

k = 2

Integers satisfying the sum of two squares theorem are squares of possible distances between integer lattice points; values up to 100 are shown, with
*
Squares (and thus integer distances) in red
*
Non-unique representations (up to rotation and reflection) bolded Sum of two squares theorem.svg
Integers satisfying the sum of two squares theorem are squares of possible distances between integer lattice points; values up to 100 are shown, with
Squares (and thus integer distances) in red
Non-unique representations (up to rotation and reflection) bolded

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 to 1 modulo 4 and d3(n) is the number of divisors of n which are congruent to 3 modulo 4. Using sums, the expression can be written as:

The prime factorization , where are the prime factors of the form and are the prime factors of the form gives another formula

, if all exponents are even. If one or more are odd, then .

k = 3

Gauss proved that for a squarefree number n > 4,

where h(m) denotes the class number of an integer m.

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

k = 4

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.

Representing n = 2km, where m is an odd integer, one can express in terms of the divisor function as follows:

k = 6

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

where is the Kronecker symbol. [3]

k = 8

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

Generating function

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

where

Numerical values

The first 30 values for are listed in the table below:

n=r1(n)r2(n)r3(n)r4(n)r5(n)r6(n)r7(n)r8(n)
0011111111
11246810121416
22041224406084112
330083280160280448
42224624902525741136
550824481123128402016
62×300249624054412883136
770006432096023685504
823041224200102034449328
9322430104250876354212112
102×508241445601560442414112
11110024965602400756021312
1222×3008964002080924031808
131308241125602040845635168
142×7004819280032641108838528
153×500019296041601657656448
16242462473040921849474864
1717084814448034801780878624
182×320436312124043801974084784
191900241601520720027720109760
2022×50824144752655234440143136
213×700482561120460829456154112
222×1100242881840816031304149184
232300019216001056049728194688
2423×30024961200822452808261184
2552212302481210781243414252016
262×13087233620001020052248246176
2733003232022401312068320327040
2822×700019216001248074048390784
2929087224016801010468376390240
302×3×5004857627201414471120395136

See also

Related Research Articles

In number theory, an arithmetic, arithmetical, or number-theoretic function is generally any function f(n) whose domain is the positive integers and whose range is a subset of the complex numbers. Hardy & Wright include in their definition the requirement that an arithmetical function "expresses some arithmetical property of n". There is a larger class of number-theoretic functions that do not fit this definition, for example, the prime-counting functions. This article provides links to functions of both classes.

<span class="mw-page-title-main">Chinese remainder theorem</span> Theorem for solving simultaneous congruences

In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer n by several integers, then one can determine uniquely the remainder of the division of n by the product of these integers, under the condition that the divisors are pairwise coprime.

In number theory, the Legendre symbol is a multiplicative function with values 1, −1, 0 that is a quadratic character modulo of an odd prime number p: its value at a (nonzero) quadratic residue mod p is 1 and at a non-quadratic residue (non-residue) is −1. Its value at zero is 0.

The Jacobi symbol is a generalization of the Legendre symbol. Introduced by Jacobi in 1837, it is of theoretical interest in modular arithmetic and other branches of number theory, but its main use is in computational number theory, especially primality testing and integer factorization; these in turn are important in cryptography.

In number theory, Euler's criterion is a formula for determining whether an integer is a quadratic residue modulo a prime. Precisely,

In number theory, a probable prime (PRP) is an integer that satisfies a specific condition that is satisfied by all prime numbers, but which is not satisfied by most composite numbers. Different types of probable primes have different specific conditions. While there may be probable primes that are composite (called pseudoprimes), the condition is generally chosen in order to make such exceptions rare.

In arithmetic, an odd composite integer n is called an Euler pseudoprime to base a, if a and n are coprime, and

In algebra and number theory, Wilson's theorem states that a natural number n > 1 is a prime number if and only if the product of all the positive integers less than n is one less than a multiple of n. That is, the factorial satisfies

<span class="mw-page-title-main">Partition function (number theory)</span> The number of partitions of an integer

In number theory, the partition functionp(n) represents the number of possible partitions of a non-negative integer n. For instance, p(4) = 5 because the integer 4 has the five partitions 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 3, 2 + 2, and 4.

<span class="mw-page-title-main">Hexagonal number</span> Type of figurate number

A hexagonal number is a figurate number. The nth hexagonal number hn is the number of distinct dots in a pattern of dots consisting of the outlines of regular hexagons with sides up to n dots, when the hexagons are overlaid so that they share one vertex.

In number theory, quadratic Gauss sums are certain finite sums of roots of unity. A quadratic Gauss sum can be interpreted as a linear combination of the values of the complex exponential function with coefficients given by a quadratic character; for a general character, one obtains a more general Gauss sum. These objects are named after Carl Friedrich Gauss, who studied them extensively and applied them to quadratic, cubic, and biquadratic reciprocity laws.

In number theory, the Kronecker symbol, written as or , is a generalization of the Jacobi symbol to all integers . It was introduced by Leopold Kronecker.

Lucas pseudoprimes and Fibonacci pseudoprimes are composite integers that pass certain tests which all primes and very few composite numbers pass: in this case, criteria relative to some Lucas sequence.

<span class="mw-page-title-main">Carmichael function</span> Function in mathematical number theory

In number theory, a branch of mathematics, the Carmichael functionλ(n) of a positive integer n is the smallest positive integer m such that

In mathematics, Hensel's lemma, also known as Hensel's lifting lemma, named after Kurt Hensel, is a result in modular arithmetic, stating that if a univariate polynomial has a simple root modulo a prime number p, then this root can be lifted to a unique root modulo any higher power of p. More generally, if a polynomial factors modulo p into two coprime polynomials, this factorization can be lifted to a factorization modulo any higher power of p.

In additive number theory, Fermat's theorem on sums of two squares states that an odd prime p can be expressed as:

In number theory, the law of quadratic reciprocity, like the Pythagorean theorem, has lent itself to an unusually large number of proofs. Several hundred proofs of the law of quadratic reciprocity have been published.

In number theory, Ramanujan's sum, usually denoted cq(n), is a function of two positive integer variables q and n defined by the formula

<span class="mw-page-title-main">Anatoly Karatsuba</span> Russian mathematician (1937–2008)

Anatoly Alexeyevich Karatsuba was a Russian mathematician working in the field of analytic number theory, p-adic numbers and Dirichlet series.

In number theory, the Fermat quotient of an integer a with respect to an odd prime p is defined as

References

  1. P. T. Bateman (1951). "On the Representation of a Number as the Sum of Three Squares" (PDF). Trans. Amer. Math. Soc. 71: 70–101. doi:10.1090/S0002-9947-1951-0042438-4.
  2. S. Bhargava; Chandrashekar Adiga; D. D. Somashekara (1993). "Three-Square Theorem as an Application of Andrews' Identity" (PDF). Fibonacci Quart. 31 (2): 129–133.
  3. 1 2 Cohen, H. (2007). "5.4 Consequences of the Hasse–Minkowski Theorem". Number Theory Volume I: Tools and Diophantine Equations. Springer. ISBN   978-0-387-49922-2.
  4. 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.