Square number

A **square number**, sometimes also called a **perfect square**, is the result of an integer multiplied by itself. 1, 4, 9, 16 and 25 are the first five square numbers.
In a formula, the square of a number _n_ is denoted  (exponentiation), usually pronounced as "_n_ squared".  The name square number comes from the name of the shape; see below.

Square numbers are non-negative. Another way of saying that a (non-negative) number is a square number, is that its square root is again an integer. For example, , so 9 is a square number.

## Examples

The squares  smaller than 70<sup>2</sup> are:

<div style="float:left; padding: 1em;">
- 0<sup>2</sup> = 0
- 1<sup>2</sup> = 1
- 2<sup>2</sup> = 4
- 3<sup>2</sup> = 9
- 4<sup>2</sup> = 16
- 5<sup>2</sup> = 25
- 6<sup>2</sup> = 36
- 7<sup>2</sup> = 49
- 8<sup>2</sup> = 64
- 9<sup>2</sup> = 81
</div>

<div style="float:left; padding: 1em;">
- 10<sup>2</sup> = 100
- 11<sup>2</sup> = 121
- 12<sup>2</sup> = 144
- 13<sup>2</sup> = 169
- 14<sup>2</sup> = 196
- 15<sup>2</sup> = 225
- 16<sup>2</sup> = 256
- 17<sup>2</sup> = 289
- 18<sup>2</sup> = 324
- 19<sup>2</sup> = 361
</div>

<div style="float:left; padding: 1em;">
- 20<sup>2</sup> = 400
- 21<sup>2</sup> = 441
- 22<sup>2</sup> = 484
- 23<sup>2</sup> = 529
- 24<sup>2</sup> = 576
- 25<sup>2</sup> = 625
- 26<sup>2</sup> = 676
- 27<sup>2</sup> = 729
- 28<sup>2</sup> = 784
- 29<sup>2</sup> = 841
</div>

<div style="float:left; padding: 1em;">
- 30<sup>2</sup> = 900
- 31<sup>2</sup> = 961
- 32<sup>2</sup> = 1024
- 33<sup>2</sup> = 1089
- 34<sup>2</sup> = 1156
- 35<sup>2</sup> = 1225
- 36<sup>2</sup> = 1296
- 37<sup>2</sup> = 1369
- 38<sup>2</sup> = 1444
- 39<sup>2</sup> = 1521
</div>

<div style="float:left; padding: 1em;">
- 40<sup>2</sup> = 1600
- 41<sup>2</sup> = 1681
- 42<sup>2</sup> = 1764
- 43<sup>2</sup> = 1849
- 44<sup>2</sup> = 1936
- 45<sup>2</sup> = 2025
- 46<sup>2</sup> = 2116
- 47<sup>2</sup> = 2209
- 48<sup>2</sup> = 2304
- 49<sup>2</sup> = 2401
</div>

<div style="float:left; padding: 1em;">
- 50<sup>2</sup> = 2500
- 51<sup>2</sup> = 2601
- 52<sup>2</sup> = 2704
- 53<sup>2</sup> = 2809
- 54<sup>2</sup> = 2916
- 55<sup>2</sup> = 3025
- 56<sup>2</sup> = 3136
- 57<sup>2</sup> = 3249
- 58<sup>2</sup> = 3364
- 59<sup>2</sup> = 3481
</div>

<div style="float:left; padding: 1em;">
- 60<sup>2</sup> = 3600
- 61<sup>2</sup> = 3721
- 62<sup>2</sup> = 3844
- 63<sup>2</sup> = 3969
- 64<sup>2</sup> = 4096
- 65<sup>2</sup> = 4225
- 66<sup>2</sup> = 4356
- 67<sup>2</sup> = 4489
- 68<sup>2</sup> = 4624
- 69<sup>2</sup> = 4761
</div>

There are infinitely many square numbers, as there are infinitely many natural numbers.

## Properties

The number _m_ is a square number if and only if one can compose a square of _m_ equal (lesser) squares:
|_m_ = 1<sup>2</sup> = 1||
| --- | --- |
|_m_ = 2<sup>2</sup> = 4||
|_m_ = 3<sup>2</sup> = 9||
|_m_ = 4<sup>2</sup> = 16||
|_m_ = 5<sup>2</sup> = 25||
|colspan=2 style="font-size:83%"|**Note:** White gaps between squares serve only to improve visual perception. There must be no gaps between actual squares.|
A square with side length _n_ has area .

The expression for the _n_th square number is _n_<sup>2</sup>. This is also equal to the sum of the first _n_ odd numbers as can be seen in the above pictures, where a square results from the previous one by adding an odd number of points (shown in magenta).  The formula follows:
So for example, .

A square number can end only with digits 0, 1, 4, 6, 9, or 25 in base 10, as follows:
1. If the last digit of a number is 0, its square ends in an even number of 0s (so at least 00) and the digits preceding the ending 0s must also form a square.
1. If the last digit of a number is 1 or 9, its square ends in 1 and the number formed by its preceding digits must be divisible by four.
1. If the last digit of a number is 2 or 8, its square ends in 4 and the preceding digit must be even.
1. If the last digit of a number is 3 or 7, its square ends in 9 and the number formed by its preceding digits must be divisible by four.
1. If the last digit of a number is 4 or 6, its square ends in 6 and the preceding digit must be **odd**.
1. If the last digit of a number is 5, its square ends in 25 and the preceding digits must be 0, 2, 06, or 56.

A square number cannot be a perfect number.

All fourth powers, sixth powers, eighth powers and so on are perfect squares.

## Special cases

- If the number is of the form _m_5 where _m_ represents the preceding digits, its square is _n_25 where  and represents digits before 25. For example the square of 65 can be calculated by  which makes the square equal to 4225.
- If the number is of the form _m_0 where _m_ represents the preceding digits, its square is _n_00 where . For example the square of 70 is 4900.
- If the number has two digits and is of the form 5_m_ where _m_ represents the units digit, its square is _AABB_ where  and . Example: To calculate the square of 57, 25 + 7 = 32 and 7<sup>2</sup> = 49, which means 57<sup>2</sup> = 3249.

## Odd and even square numbers

Squares of even numbers are even (and in fact divisible by 4), since .

Squares of odd numbers are odd, since .

It follows that square roots of even square numbers are even, and square roots of odd square numbers are odd.

As all even square numbers are divisible by 4, the even numbers of the form  are not square numbers.

As all odd square numbers are of the form , the odd numbers of the form  are not square numbers.

Squares of odd numbers are of the form , since  and  is an even number.

## Further reading

- Conway, J. H. and Guy, R. K. _The Book of Numbers_. New York: Springer-Verlag, pp. 30–32, 1996.

## Other websites

- Learn Square Numbers . Practice square numbers up to 144 with this children's multiplication game
- Dario Alpern, Sum of squares. A Java applet to decompose a natural number into a sum of up to four squares.
- Fibonacci and Square Numbers  at Convergence
- The first 1,000,000 perfect squares Includes a program for generating perfect squares up to 10<sup>15</sup>.