Cube numbers and their properties

Stack unit cubes into a bigger cube — 22 along each edge and you have used 88 small cubes; 33 along each edge and you have used 2727. Multiply any whole number by itself three times and you land on one of these special numbers, a perfect cube, the three-dimensional cousin of the square numbers you already know. Cubes turn out to have their own fingerprint: a prime-factorisation test built from triples instead of pairs, a last-digit pattern that (unlike squares) allows every digit from 00 to 99, and a trailing-zero rule tied to multiples of 33. This article — continuing the Class 8 chapter "A Square and A Cube" — collects those patterns, works through checking and fixing near-cubes by prime factorisation, and meets the famous taxicab number 17291729 along the way.

The core insight

A whole number is a perfect cube exactly when every prime in its factorisation occurs a multiple of three times, which is why grouping factors into triples (rather than the pairs used for squares) is the master test for recognising, building and repairing cubes.

The core idea

A perfect cube is a number of the form n3=n×n×nn^3 = n \times n \times n for a whole number nn. The first ten are:

1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, …1,\ 8,\ 27,\ 64,\ 125,\ 216,\ 343,\ 512,\ 729,\ 1000,\ \dots

Prime-factorisation test. Break a number into primes and look at each prime's exponent. The number is a perfect cube exactly when every exponent is a multiple of 33:

N=p1a1×p2a2×⋯is a perfect cube  ⟺  a1,a2,… are all multiples of 3.N = p_1^{a_1}\times p_2^{a_2}\times\cdots \quad\text{is a perfect cube} \iff a_1, a_2,\ldots \text{ are all multiples of } 3.

where: NN is the number being tested, p1,p2,…p_1, p_2,\ldots are its distinct prime factors, and a1,a2,…a_1, a_2,\ldots are their exponents. For example, 1728=26×331728 = 2^6 \times 3^3 — both 66 and 33 are multiples of 33, so 17281728 is a perfect cube (and 17283=22×3=12\sqrt[3]{1728} = 2^2\times3 = 12).

Unit-digit pattern. Squares skip the digits 2,3,7,82,3,7,8 at the end, but cubes do not skip anything — every digit 00–99 can be the last digit of a perfect cube. The pairing is still fixed and useful for later estimating cube roots: 1,4,5,6,9,01,4,5,6,9,0 map to themselves, while 2↔82\leftrightarrow8 and 3↔73\leftrightarrow7 swap (so a number ending in 22 cubes to something ending in 88, and vice versa).

Trailing zeros. A perfect cube that ends in zeros must end in a number of zeros that is a multiple of 33, because each trailing zero comes from one factor of 10=2×510 = 2\times5, and both the 22s and the 55s must occur in complete triples. The picture below is why the rule uses triples: a cube number literally measures a three-dimensional stack, so three matching factors — length, breadth and height — must all be present.

Figure
Bar chart comparing n squared and n cubed for n from 1 to 5 showing cubes grow far faster than squares
Squares vs cubes for n = 1 to 5 n 1 2 3 4 5 n squared n cubed

Common trap avoided by the picture

A student who has only met squares expects cubes to grow at roughly the same rate — the bar chart shows how quickly a cube outpaces the matching square, which is worth keeping in mind when estimating whether a large number could plausibly be a cube.

Derivation ATesting and repairing a near-cube using prime factorisation

The goal is to show, using nothing beyond prime factorisation and the divisibility facts a Class 8 student already has, exactly how to decide whether a given whole number is a perfect cube and, if it falls short, how to find the smallest number that must multiply it to make it one — the same reasoning that also tells you the smallest number to divide by instead.

Step 1. Write NN as a product of primes, collecting equal factors as powers: N=p1a1×p2a2×⋯N = p_1^{a_1}\times p_2^{a_2}\times\cdots. This is ordinary prime factorisation, exactly as used for squares, except now the exponents will be sorted into groups of three instead of two.

Step 2. Check every exponent against the nearest multiple of 33 above it. If aia_i is already a multiple of 33, that prime needs nothing. If not, the "shortfall" is 3⌈ai/3⌉−ai3\lceil a_i/3\rceil - a_i — the number of extra copies of pip_i needed to complete the next triple.

Step 3. Multiply NN by p1(shortfall1)×p2(shortfall2)×⋯p_1^{(\text{shortfall}_1)}\times p_2^{(\text{shortfall}_2)}\times\cdots, one shortfall factor for every prime that was not already a multiple of 33. The product now has every exponent a multiple of 33, so it is a perfect cube by the test in the core idea section above.

Step 4. To divide down instead of multiplying up, remove complete "extra" triples where possible, or drop an entire prime whose exponent is not a multiple of 33 if dividing it out entirely still leaves the rest of the exponents as multiples of 33. Both routes are legitimate; which one a question wants depends on whether it asks for a multiplier or a divisor.

Worked example

Check whether 27442744 is a perfect cube using prime factorisation, and if not a cube already, find the smallest number to multiply 7272 by to make it one.

Step 1. Factorise 27442744: 2744÷2=13722744\div2=1372, 1372÷2=6861372\div2=686, 686÷2=343686\div2=343, 343÷7=49343\div7=49, 49÷7=749\div7=7, 7÷7=17\div7=1. So 2744=23×732744 = 2^3\times7^3.

Step 2. Both exponents are 33, already multiples of 33, so 27442744 is a perfect cube. Taking one factor from each triple, 27443=2×7=14\sqrt[3]{2744} = 2\times7 = 14. Check: 143=14×14×14=196×14=274414^3 = 14\times14\times14 = 196\times14 = 2744. ✓

Step 3. Now factorise 7272: 72=23×3272 = 2^3\times3^2. The exponent of 22 is already 33 — fine. The exponent of 33 is 22, one short of the next multiple of 33, which is 33.

Step 4. Multiply by the single missing factor of 33: 72×3=21672\times3 = 216. Check: 216=23×33=(2×3)3=63216 = 2^3\times3^3 = (2\times3)^3 = 6^3. The smallest multiplier is 33, giving the perfect cube 216=63216 = 6^3.

Competitive stretch

The same 7272 can instead be reduced to a cube: since 232^3 is already a complete triple, dividing out the whole factor 323^2 (that is, dividing by 99) leaves 72÷9=8=2372\div9 = 8 = 2^3, also a perfect cube. So a single starting number can have more than one nearby cube depending on whether the question asks you to multiply or divide.

Common traps

  • Using the square rule (pairs) when the question asks about cubes (triples). 36=22×3236 = 2^2\times3^2 is a perfect square but not a perfect cube — check which grouping the question actually needs.
  • Assuming cubes skip last digits the way squares skip 2,3,7,82,3,7,8. Cubes can end in any digit, so the last-digit test alone can never rule a number out as a cube (it only helps predict what the last digit would be).
  • Miscounting the trailing-zero rule. A cube can end in 33, 66 or 99 zeros; only a zero-count that is not a multiple of 33 (like 22, 44 or 55 zeros) proves a number cannot be a perfect cube.
  • Forgetting that each prime needs its own top-up. When finding the smallest multiplier, every prime whose exponent is not already a multiple of 33 needs its own separate correction — do not fix only one prime and assume the job is done.

Ask the tutor: Want more practice spotting perfect cubes by prime factorisation, or a few more special numbers like 17291729 to explore?

Why does squaring use pairs of factors but cubing use triples of factors?

A square number n2n^2 is built from two equal factors, n×nn\times n, so in its prime factorisation every prime must appear an even number of times — grouped in pairs. A cube number n3n^3 is built from three equal factors, n×n×nn\times n\times n, so every prime must appear a multiple of three times — grouped in triples. The grouping size simply matches how many times nn is repeated in the product.

Can a perfect cube end in 0, and does that mean anything special?

Yes — for example 1000=1031000 = 10^3 ends in three zeros. But not every number ending in zeros is a cube: the zero-count itself must be a multiple of 33. This is because each trailing zero comes from a factor of 10=2×510 = 2\times5, and the cube test demands that both the 22s and the 55s in the factorisation occur in complete triples, which forces the zero-count to be 0,3,6,9,…0, 3, 6, 9,\ldots.

What makes 1729 so special, and is it a perfect cube itself?

17291729 is not a perfect cube on its own, but it is famous as the smallest number that can be written as the sum of two cubes in two genuinely different ways: 1729=13+123=93+1031729 = 1^3+12^3 = 9^3+10^3. It is called the taxicab number after a story about the mathematician Srinivasa Ramanujan, who instantly recognised this property when told the number of a taxicab was "rather dull." It is a good reminder that cube arithmetic hides patterns well beyond the basic perfect-cube test.

Before this

Where this leads