Mathwords logoMathwords

Squarefree — Definition, Formula & Examples

Squarefree is a property of a positive integer meaning no perfect square (other than 1) divides it evenly. For example, 30 is squarefree because no square like 4, 9, 16, or 25 divides 30, while 12 is not squarefree because 4 divides 12.

A positive integer nn is squarefree if and only if, for every prime pp, the exponent of pp in the prime factorization of nn is at most 1. Equivalently, nn is squarefree if there is no integer d>1d > 1 such that d2nd^2 \mid n.

How It Works

To test whether nn is squarefree, find its prime factorization. If every prime appears exactly once, the number is squarefree. If any prime appears with exponent 2 or higher, it is not. Alternatively, you can check divisibility by small perfect squares: 4,9,25,49,4, 9, 25, 49, \ldots up to n\sqrt{n}. Every positive integer nn can be uniquely written as n=a2bn = a^2 b where bb is squarefree, which separates out the "square part" from the squarefree part.

Worked Example

Problem: Determine whether 180 is squarefree.
Step 1: Find the prime factorization of 180.
180=22×32×5180 = 2^2 \times 3^2 \times 5
Step 2: Check the exponents. The prime 2 appears with exponent 2, and the prime 3 also appears with exponent 2. Since at least one prime has an exponent greater than 1, the number is not squarefree.
Step 3: Extract the squarefree part. Write 180 as a product of a perfect square and a squarefree integer.
180=62×5180 = 6^2 \times 5
Answer: 180 is not squarefree. Its squarefree part is 5, and its square part is 62=366^2 = 36.

Why It Matters

Squarefree integers appear throughout number theory and algebra. In quadratic field theory, each quadratic field Q(d)\mathbb{Q}(\sqrt{d}) is uniquely determined by a squarefree integer dd. The density of squarefree numbers among the positive integers is 6/π20.6086/\pi^2 \approx 0.608, a result tied to the Riemann zeta function.

Common Mistakes

Mistake: Confusing squarefree with prime. Students sometimes assume squarefree numbers must be prime.
Correction: A squarefree number can be composite — it just cannot have any repeated prime factor. For instance, 30=2×3×530 = 2 \times 3 \times 5 is squarefree but not prime.