Fact-checked by Grok 2 weeks ago

Square number

A square number, also known as a , is an that is the square of another , meaning it is the product of two identical integers. For example, the square numbers include (), (), (2²), 9 (3²), (4²), 25 (5²), (6²), (7²), (8²), and 81 (9²). These numbers form a where each term is given by the n^2, with n being a non-negative . Square numbers exhibit several distinctive mathematical properties that distinguish them from other integers. One key property is that the square root of a perfect square is always an , unlike non-square numbers whose square roots are . Additionally, perfect squares always end in the digits 0, 1, 4, 5, 6, or 9, and no perfect square ends in 2, 3, 7, or 8. The sum of the first n numbers equals n^2, providing a visual representation where square numbers can be constructed by arranging dots or objects into a square grid. Even squares are multiples of 4, while odd squares are congruent to 1 8. The concept of square numbers dates back to ancient mathematics, with Euclid defining a square number in his Elements as "equal multiplied by equal, or a number which is contained by two equal numbers." They play a fundamental role in number theory, appearing in theorems such as Fermat's theorem on sums of two squares, which states that a prime number can be expressed as the sum of two squares if and only if it is of the form 4k+1. In geometry and algebra, square numbers underpin calculations involving areas of squares and solutions to quadratic equations.

Fundamentals

Definition

A square number, also known as a , is an that results from multiplying an by itself, formally expressed as n^2 where n is any . This includes positive integers, zero, and negative integers, with the square of a negative equaling the square of its positive counterpart, such as (-3)^2 = 9 = [3^2](/page/3-2). Zero is included as a square number since $0^2 = 0. Square numbers are distinct from the broader concept of squares in mathematics, which can apply to any real number; for instance, (\sqrt{2})^2 = 2, but 2 is not a square number because \sqrt{2} is not an integer. The term "square" originates from the geometric context of squaring a length to find the area of a square, emphasizing the integer-based nature in this definition.

Notation

Square numbers are conventionally denoted using superscript notation, where the square of an n is written as n^2, representing n multiplied by itself. The principal (non-negative) of a non-negative x is denoted by the \sqrt{x}, which yields the non-negative whose square x. To express the largest less than or equal to a positive n, the notation \lfloor \sqrt{n} \rfloor^2 is used, where \lfloor \cdot \rfloor denotes the , returning the greatest less than or equal to \sqrt{n}. This construction identifies the square of the part of \sqrt{n}, providing a standard way to bound square numbers below a given . In sequences and databases, square numbers are cataloged using established conventions, such as the (OEIS) entry A000290, which lists the squares starting from n = 0: 0, 1, 4, 9, 16, .... Although the equation x^2 = y may have two real solutions x = \pm \sqrt{y} for y > 0, square numbers themselves are defined as non-negative values, and the principal \sqrt{y} excludes the negative root by convention. This ensures consistency in mathematical contexts where square numbers represent quantities like areas or counts, which cannot be negative.

Examples and Illustrations

Sequence of Square Numbers

The sequence of square numbers consists of the squares of the non-negative integers, beginning with 0² = , 1² = , 2² = 4, 3² = 9, and continuing indefinitely. This infinite sequence is strictly increasing for n ≥ 0 and contains no repetitions, as each successive term is larger than the previous one. The initial terms of the sequence are presented in the following for illustration:
n
00
11
24
39
4
525
6
749
864
981
10100
11121
12144
13169
14196
15225
16256
17289
18324
19361
20400
21441
22484
23529
24576
25625
26676
27729
28784
29841
30900
31961
32
These terms extend up to around 1000, with further values following the same pattern; for example, 31² = 961 and 32² = . Square numbers exhibit growth, meaning the nth square is proportional to n², leading to increasingly rapid expansion as n grows. The differences between consecutive squares form the sequence of positive integers: for instance, 2² - ² = 3, 3² - 2² = 5, 4² - 3² = 7, and so on. This pattern arises from the identity (n+1)^2 - n^2 = 2n + [1](/page/1), which generates successive numbers starting from (for n=).

Geometric Interpretation

Square numbers originate in as the measures of areas enclosed by squares with side lengths. Specifically, for a positive n, the square number n^2 denotes the area of whose sides each measure n units, assuming unit length as the base measure. For example, a square with side length 3 units has an area of 9 square units. This geometric concept traces back to ancient around 2000 BCE, where square numbers were computed and tabulated on clay tablets for practical applications in land measurement and construction. These tablets, discovered at sites like Senkerah on the , list squares of integers up to and demonstrate their use in solving geometric problems, such as determining dimensions of rectangles with given areas through calculations. Visually, square numbers are represented by arranging unit dots or points in a square lattice , where the side length n defines n rows and n columns of points, yielding n^2 total elements. For instance, the square number appears as a 4×4 of 16 dots, forming a compact square that highlights the uniform of the plane with unit squares. As a class of figurate numbers, square numbers exemplify polygonal arrangements where dots form regular four-sided figures, distinguishing them from triangular or pentagonal counterparts in the broader family of such numerically representable shapes. These geometric depictions, such as the square arrays for 1, 4, and 9, provide an intuitive link to their sequential progression.

Mathematical Properties

Algebraic Properties

Square numbers play a central role in several key algebraic identities, particularly those involving expansions and factorizations of polynomials. The expansion for the square of a provides one of the most basic examples: for any real numbers a and b, (a + b)^2 = a^2 + 2ab + b^2. This identity follows directly from the applied to exponent 2, where the coefficients are given by binomial coefficients. A related form arises from the square of a : (a - b)^2 = a^2 - 2ab + b^2. These expansions highlight how square numbers a^2 and b^2 combine with cross terms to form the overall square. This binomial identity extends naturally to the square of a finite sum of n terms. For variables a_1, a_2, \dots, a_n, the expansion is \left( \sum_{i=1}^n a_i \right)^2 = \sum_{i=1}^n a_i^2 + 2 \sum_{1 \leq i < j \leq n} a_i a_j. Here, the first sum collects the individual square numbers, while the double sum accounts for pairwise products. This generalization is a direct consequence of distributing the square over the summation and applying the binomial case repeatedly. For instance, with three terms a + b + c, it yields (a + b + c)^2 = a^2 + b^2 + c^2 + 2ab + 2ac + 2bc. Another essential identity is the difference of squares, which factors a difference of two square numbers into linear terms: a^2 - b^2 = (a - b)(a + b). This factorization is a polynomial identity that holds for all a and b, enabling simplification in algebraic manipulations and equation solving. It is particularly useful in factoring higher-degree polynomials or resolving expressions in rings where such differences appear. The product of two numbers also relates directly to square numbers through the power rule: (ab)^2 = a^2 b^2. This follows from the exponentiation property (xy)^n = x^n y^n for positive integers n, with n=2 yielding the square case. Combining this with the expansions above allows expressions like ((a + b)c)^2 = (a + b)^2 c^2 = (a^2 + 2ab + b^2) c^2, illustrating how square numbers propagate through products of sums. Square numbers are intrinsically linked to quadratic equations, where integer solutions often require perfect square discriminants. Consider the quadratic equation ax^2 + bx + c = 0 with integer coefficients a, b, c and a \neq 0. The roots given by the quadratic formula are rational if and only if the discriminant d = b^2 - 4ac is a perfect square. For the roots to be integers, these rational roots must additionally be integers, which requires conditions such as $2a dividing -b \pm \sqrt{d}. For example, in the monic case x^2 + px + q = 0, integer roots exist precisely when p^2 - 4q is a square number. This connection underscores the role of square numbers in determining solvability over the integers.

Arithmetic Properties

Square numbers possess distinct divisibility properties within integer arithmetic. Specifically, any square number n^2 satisfies n^2 \equiv 0 \pmod{4} or n^2 \equiv 1 \pmod{4}, as even n = 2k yields (2k)^2 = 4k^2 \equiv 0 \pmod{4}, while odd n = 2k+1 yields (2k+1)^2 = 4k^2 + 4k + 1 \equiv 1 \pmod{4}. In the prime factorization of a square number, every prime congruent to 3 modulo 4 must appear with an even exponent, a consequence of the fact that all exponents in the factorization of n^2 are even. Multiplicatively, the product of two square numbers is always a square number. If m = a^2 and k = b^2 for integers a and b, then m \cdot k = (a b)^2, preserving the square form under multiplication. Additively, square numbers exhibit constrained behaviors in sums. For instance, the sum of three consecutive squares (n-1)^2 + n^2 + (n+1)^2 = 3n^2 + 2 cannot equal another square m^2 for any integers n > 0 and m, as $3n^2 + 2 \equiv 2 \pmod{3} while squares are congruent to 0 or 1 modulo 3. A key formula governs the sum of the first n squares: \sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}. This can be derived by telescoping the difference of cubes: \sum_{k=1}^n \left[ (k+1)^3 - k^3 \right] = (n+1)^3 - 1^3 = \sum_{k=1}^n (3k^2 + 3k + 1) = 3 \sum_{k=1}^n k^2 + 3 \sum_{k=1}^n k + \sum_{k=1}^n 1. Substituting the known sums \sum k = \frac{n(n+1)}{2} and \sum 1 = n, and solving for \sum k^2 yields the .

Parity and Modular Behavior

Even and Odd Square Numbers

The of a square number is determined by the of its base . The square of an even is even, as expressed by the (2k)^2 = 4k^2 for any k, which is clearly divisible by 2. Similarly, the square of an is , given by (2k+1)^2 = 4k^2 + 4k + 1 = 4(k^2 + k) + 1, which leaves a of 1 when divided by 2. Furthermore, every even square is divisible by 4, since $4k^2 is a multiple of 4. For odd squares, they are congruent to modulo , meaning (2k+1)^2 \equiv 1 \pmod{8}. Examples of even squares include $2^2 = 4, $4^2 = 16, and $6^2 = [36](/page/36), all divisible by 4. Odd squares include [1](/page/1)^2 = 1, $3^2 = 9, and $5^2 = 25, each congruent to 1 modulo 8. This parity implies that no square number is congruent to 2 or 3 modulo 4, as even squares are 0 modulo 4 and odd squares are 1 modulo 4.

Squares Modulo Small Integers

In , the possible values of n^2 \mod m for n and fixed small positive m are known as the quadratic residues modulo m. These residues reveal patterns in the distribution of squares and are fundamental to understanding solvability of quadratic congruences. For prime moduli p, the \left( \frac{a}{p} \right) provides a way to determine if a is a modulo p: it equals 1 if a is a nonzero quadratic residue, -1 if a quadratic nonresidue, and 0 if p divides a. For modulo 3, the quadratic residues are 0 and 1, as $0^2 \equiv 0, $1^2 \equiv 1, and $2^2 \equiv 1 \pmod{3}, so 2 is not a residue. Modulo 5, the residues are 0, 1, and 4, since $0^2 \equiv 0, $1^2 \equiv 1, $2^2 \equiv 4, $3^2 \equiv 4, and $4^2 \equiv 1 \pmod{5}, excluding 2 and 3. Modulo 7, they are 0, 1, 2, and 4, with $0^2 \equiv 0, $1^2 \equiv 1, $2^2 \equiv 4, $3^2 \equiv 2, $4^2 \equiv 2, $5^2 \equiv 4, and $6^2 \equiv 1 \pmod{7}, so 3, 5, and 6 are nonresidues. Modulo 8, the quadratic residues are 0, 1, and 4; specifically, squares of even integers are congruent to 0 or 4, while squares of integers are congruent to 1. This aligns with the analysis of in squares, serving as a special case for moduli 2 and 4. The following table summarizes the quadratic residues modulo small integers up to 10, obtained by direct computation of k^2 \mod m for k = 0 to m-1:
Modulus mQuadratic Residues
20, 1
30, 1
40, 1
50, 1, 4
60, 1, 3, 4
70, 1, 2, 4
80, 1, 4
90, 1, 4, 7
100, 1, 4, 5, 6, 9
These patterns illustrate that the number and distribution of quadratic residues vary with m, with roughly half the nonzero residues being quadratic for odd primes, highlighting the symmetric yet restricted nature of squares in modular arithmetic.

Special Square Numbers

Trivial and Unit Squares

The square number zero arises from $0^2 = 0, representing the smallest non-negative perfect square and serving as the additive identity in the ring of integers, where it satisfies $0 + n = n for any integer n. This property underscores its foundational role, as zero is the unique square number that acts as the additive identity. The unit square is given by $1^2 = 1 and (-1)^2 = 1, making one the multiplicative identity in the integers, where $1 \cdot n = n for any integer n. It is the unique positive integer that is a perfect square equal to itself in this manner, as the equation n^2 = 1 has only the integer solutions n = \pm 1. These trivial squares, zero and one, form the starting points of the sequence of square numbers, beginning with 0 followed by 1, and provide baseline cases in mathematical progressions and identities. In Diophantine equations involving squares, solutions where variables take values yielding 0 or 1 often constitute trivial cases, such as when one or more terms are zero, simplifying the equation to an identity.

Notable Large or Unique Squares

One of the most notable large squares in modern computation arises from squaring the , which as of October 2024 is the $2^{136279841} - 1, comprising 41,024,320 decimal digits. The square of this prime would thus be an extraordinarily vast number with over 82 million digits, illustrating the scale achievable with contemporary high-performance computing in projects like the . Palindromic squares, which read the same forwards and backwards, represent a unique class of square numbers due to their symmetric structure. For instance, $11^2 = 121 and $111^2 = 12321 are early examples where the base number itself is palindromic, producing a mirrored square; this pattern extends to larger cases like $1111^2 = 1234321. Such squares are rare beyond small values, as the palindromic constraint imposes strict conditions on the integer root. Repunits—numbers consisting entirely of the 1, such as 1, 11, 111—yield squares only in the trivial case of 1 itself, as no repunit with more than one digit is a . This follows from properties: for a R_r = (10^r - 1)/9 with r > 1, its square cannot satisfy the necessary conditions small primes like 10 or 20. In the , the only s are the initial terms 0, 1, 1, and 144 (where F_{12} = 144 = 12^2); this result was rigorously proven in 2006 by Bugeaud, Mignotte, and Siksek, confirming no further squares appear despite the sequence's infinite growth. Historically, medieval mathematicians occasionally documented impressively large squares for their era, highlighting the era's emphasis on arithmetic prowess without modern notation.

References

  1. [1]
    Square Number -- from Wolfram MathWorld
    A square number, also called a perfect square, is a figurate number of the form S_n=n^2, where n is an integer.
  2. [2]
    [PDF] What Is Number Theory? - Brown Math
    Jan 19, 2012 · Number Shapes. The square numbers are the numbers 1, 4, 9, 16, ... that can be arranged in the shape of a square.
  3. [3]
    What Is a Perfect Square in Math? A Complete (& Easy) Guide
    Jul 17, 2024 · A square root is the number we have to multiply by itself to get a square number. The square root of a perfect square is always a whole number.
  4. [4]
    Square Numbers - Definition, Chart, Methods, Properties, Patterns ...
    Perfect square numbers end with either 0, 1, 4, 5, 6 or 9. Property 2: No perfect square number can end with 2, 3, 7 or 8. Property 3:.
  5. [5]
    Euclid's Elements, Book VII, Definitions 15 through 19
    18. A square number is equal multiplied by equal, or a number which is contained by two equal numbers. 19. And a cube is equal multiplied by ...
  6. [6]
    [PDF] An Exploration of the Sums of Two Squares and Pentagonal Numbers
    Fermat's Two Square Theorem states that any prime number of the form 4n+1 can be written as the sum of two squares [4].
  7. [7]
    properties of perfect square numbers - BYJU'S
    ... square number that is produced when 2 is multiplied by itself. It is ... Square root of perfect square is always a natural number. Examples of perfect ...
  8. [8]
    What Does “Squared” Mean in Math? Explain It to a 10-Year-Old
    Jul 10, 2024 · A square number is the result of multiplying a number by itself. For instance, if you take the number 3 and multiply it by 3, you get 9.
  9. [9]
    What is the difference between, a "square" and a "perfect-square ...
    May 19, 2019 · A square number can also be called a perfect square. So yes, the number 36 is a perfect square, because it is the product of 6 and itself.In English, is there a difference between square and squared?Why are the differences between consecutive squares equal to the ...More results from math.stackexchange.com<|control11|><|separator|>
  10. [10]
    Square - Etymology, Origin & Meaning
    Originating in mid-13c. Old French and Latin *exquadrare* ("to square"), square means a tool for right angles, four equal sides, and fairness or honesty.
  11. [11]
    Principal Square Root -- from Wolfram MathWorld
    The unique nonnegative square root of a nonnegative real number. For example, the principal square root of 9 is 3, although both -3 and 3 are square roots of 9.
  12. [12]
    BigInteger (Java SE 19 & JDK 19)
    It is equal to the value of floor(sqrt(n)) , where sqrt(n) denotes the real square root of n treated as a real. Note that the integer square root will be less ...<|control11|><|separator|>
  13. [13]
    A000290 - OEIS
    This sequence is related to partitions of 2^n into powers of 2, as it is shown in A002577. So A002577 connects the squares and A000447.
  14. [14]
    None
    ### Summary of Difference Between Consecutive Square Numbers, Formula, and Patterns
  15. [15]
    Babylonian mathematics - MacTutor - University of St Andrews
    which shows that a table of squares is all that is necessary to multiply numbers, simply taking the difference of the two squares that were looked up in the ...
  16. [16]
    Binomial Theorem -- from Wolfram MathWorld
    Binomial Theorem ; (x+a)^nu=sum_(k=0)^infty. (1) ; (x+a)^n=sum_(k=0)^n. (2) ; (x+a)^(-n)=sum_(k=0. (3) ; (1+z)^a=sum_(k=0)^infty. (4) ...
  17. [17]
    Calculus I - Summation Notation - Pauls Online Math Notes
    Nov 16, 2022 · The first thing that we need to do is square out the stuff being summed and then break up the summation using the properties as follows,. 100 ...
  18. [18]
    Polynomial Identity -- from Wolfram MathWorld
    Polynomial identities involving sums and differences of like powers include x^2-y^2 = (x-y)(x+y) (1) x^3-y^3 = (x-y)(x^2+xy+y^2) (2) x^3+y^3 ...
  19. [19]
    Polynomials - Algebra - Pauls Online Math Notes
    Nov 16, 2022 · Polynomials in two variables are algebraic expressions consisting of terms in the form axnym a x n y m . The degree of each term in a polynomial ...Missing: expansion | Show results with:expansion
  20. [20]
    [PDF] From Weissman's book An illustrated theory of numbers - UCSD Math
    Fix two numbers a, b ∈ Z. Show that the quadratic equation x2 + ax + b = 0 has integer solutions x if and only if the discriminant a2 −4b is a perfect square.
  21. [21]
    Algebra - Quadratic Equations : A Summary - Pauls Online Math Notes
    Nov 16, 2022 · Quadratic equations can be solved using square root property, factoring, or the quadratic formula. The discriminant (b²-4ac) determines if ...
  22. [22]
    [PDF] 17 Sums of two squares - Caltech
    Then n can be written as a sum of two squares iff every prime ≡ 3 (mod 4) occurs to a even power in its prime factorization. Proof of Theorem (modulo ...
  23. [23]
    Sum of First n Squares Equals n(n+1)(2n+1)6 - Math Stack Exchange
    Jun 27, 2011 · Here's a concrete computation, applying the binomial theorem on the RHS of (1) and doing a series expansion around x=1.How to get to the formula for the sum of squares of first n numbers?How do I derive $1 + 4 + 9 + \cdots + n^2 = \frac{n (n + 1) (2n + 1)} 6More results from math.stackexchange.com
  24. [24]
    [PDF] Discrete Mathematics
    Jan 29, 2013 · Odd integers are those of the form 2k + 1. Even integers are those of the form 2k. Theorem. If n is an odd number, then n2 is odd. Theorem.Missing: theory | Show results with:theory
  25. [25]
    [PDF] Sums of Squares - Boston University
    It says that if two numbers are sum of two squares, so is their product. For example 493 = 17 ∗ 29 and 17 = 12 + 42, 29 = 22 + 52 give 493 = (1 ∗ 2 − 4 ...
  26. [26]
    [PDF] 7 Quadratic Residues - UCI Mathematics
    Here are all possible equations modulo p = 3,5 and 7, and whether each a is a quadratic residue modulo p. a equation solutions QR? 1 x2 ≡ 1 (mod 3) x ≡ 1, 2.
  27. [27]
    [PDF] Math 406 Section 11.1: Quadratic Residues and Nonresidues
    The quadratic residues mod 7 are {1, 2, 4} while the quadratic nonresidues are {3, 5, 6}. Ac- cording to our definition 0 is neither because it's not coprime to ...
  28. [28]
    [PDF] Review of Group Theory Definitions, Change of Basis, Trace ...
    Jun 19, 2004 · What are the squares modulo 8? 12 ≡ 1,22 ≡ 4,32 ≡ 1, 42 ≡ 0, and then the pattern repeats (as modulo 8, k and (8 − k) have the same ...
  29. [29]
    [PDF] quadratic-residues.pdf
    Aug 4, 2019 · a is a quadratic residue mod m if the following equation has a solution: x2 = a (mod m) . Otherwise, a is a quadratic nonresidue mod m. Example.
  30. [30]
    [PDF] Diophantine Equations
    The solution of x2 + y2 = z2 will help us prove that the diophantine equation. X4 + Y 4 = Z4. (5.1) has only trivial solutions, namely those with X = 0 or Y = 0 ...
  31. [31]
    Mersenne Prime Number discovery - 2 136279841 -1 is Prime!
    The largest known prime number, 2^136,279,841-1, was discovered by Luke Durant on October 12th. It is a Mersenne prime, calculated by multiplying 136,279,841 ...
  32. [32]
    New Prime Number, 41 Million Digits Long, Breaks Math Records
    Nov 1, 2024 · ... prime search confirmed that he had indeed found a needle in a haystack: 2136,279,841 – 1 is the largest known prime number. It exceeds the ...
  33. [33]
    Palindromic Number -- from Wolfram MathWorld
    The first few palindromic numbers are therefore are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, ... (OEIS A002113). The ...
  34. [34]
    More about Palindromic Squares - World!Of Numbers
    Aug 5, 2025 · For example, the squares of 1, 11, 111, and 1111 are respec- tively 1, 121, 12321, and 1234321, all palindromes, and the rule applies for any ...
  35. [35]
    Repunit cannot be Square - ProofWiki
    Nov 2, 2021 · Theorem. A repunit (apart from the trivial 1) cannot be a square. Proof. Let m be a repunit with r digits such that r>1.
  36. [36]
    Square Fibonacci numbers - Mathematics Stack Exchange
    Nov 9, 2014 · Here is a paper of Bugeaud, Mignotte, and Siksek proving that the only perfect powers in the Fibonacci sequence are 0, 1, 8, 144. Therefore the only squares ...Perfect Squares in Fibonacci Numbers - Math Stack ExchangeGenerating function for squared fibonacci numbersMore results from math.stackexchange.com
  37. [37]
    Computing square root floor - Applied Mathematics Consulting
    Jan 1, 2024 · Given an integer n, suppose you want to compute ⌊√n⌋, the greatest integer less than or equal to the square root of n.Missing: notation | Show results with:notation