In mathematics, a **square number**, sometimes also called a **perfect square**, is a positive integer that can be written as the square of some other integer. So for example, 9 is a square number since it can be written as 3×3. By convention, the first square number is 1. The number *m* is a square number if and only if one can arrange *m* points in a square:

1:

+ x4:

x + x x + + x x9:

x x + x x x x x + x x x + + + x x x16:

x x x + x x x x x x x + x x x x x x x + x x x x + + + + x x x x25:

x x x x + x x x x x x x x x + x x x x x x x x x + x x x x x x x x x + x x x x x + + + + + x x x x xThe formula for the

A square number is also the sum of two consecutive triangular numbers.

Lagrange's four-square theorem states that any positive integer can be written as the sum of at most 4 perfect squares. 3 squares are not sufficient for numbers of the form 4^{k}(8*l* + 7). This is generalized by Waring's problem.

A positive integer that has no perfect square divisors except 1 is called square-free.

**See also:**