Perfect Squares

Complete list of perfect square numbers up to 1,000

0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 961

What are Perfect Squares?

A perfect square (or square number) is an integer that can be expressed as the product of some integer with itself. In other words, n is a perfect square if n = k² for some integer k. The first perfect squares are: 0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400.

Properties of Perfect Squares

Perfect squares have several distinctive properties. Every perfect square ends in 0, 1, 4, 5, 6, or 9 in base 10 — a number ending in 2, 3, 7, or 8 can never be a perfect square. The digital root of a perfect square is always 1, 4, 7, or 9. Every perfect square has an odd number of divisors, which is a unique characteristic — non-square numbers always have an even number of divisors.

The difference between consecutive perfect squares follows the pattern: 1, 3, 5, 7, 9, 11... — these are consecutive odd numbers. This means n² = 1 + 3 + 5 + 7 + ... + (2n − 1), the sum of the first n odd numbers. This beautiful identity was known to the ancient Pythagoreans.

Geometric Interpretation

The name "square" comes from geometry: a perfect square number represents the area of a square with integer side length. 9 = 3² represents a 3×3 square, 16 = 4² represents a 4×4 square, and so on. This geometric connection extends to higher dimensions — perfect cubes represent volumes of cubes with integer edges.

Perfect squares also appear in the Pythagorean theorem: a² + b² = c². A Pythagorean triple like (3, 4, 5) means that 9 + 16 = 25. Finding all such triples is a classic problem in number theory dating back to Babylonian mathematics.

Testing for Perfect Squares

To check if a number n is a perfect square, compute its integer square root k = ⌊√n⌋ and verify that k² = n. Fast integer square root algorithms use Newton's method or binary search. In programming, floating-point square root functions may have rounding errors for large numbers, so integer-based methods are preferred for exact results.

Perfect Squares in Number Theory

Lagrange's four-square theorem states that every positive integer can be expressed as the sum of at most four perfect squares. For example, 7 = 4 + 1 + 1 + 1 = 2² + 1² + 1² + 1². Fermat's theorem on sums of two squares states that an odd prime p can be expressed as the sum of two squares if and only if p ≡ 1 (mod 4).

The Basel problem, solved by Euler in 1734, showed that the sum of reciprocals of all perfect squares equals π²/6: 1/1 + 1/4 + 1/9 + 1/16 + ... = π²/6. This surprising connection between perfect squares and π is one of the most beautiful results in mathematics.

Applications

Perfect squares appear throughout science and engineering. In physics, the inverse square law governs gravity, electrostatics, and light intensity. In computer science, square matrices, quadratic algorithms (O(n²)), and hash table collision analysis involve perfect squares. In statistics, the chi-squared test and variance calculations use squared values.