ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude
Perfect squares and cubes: the least number to make one, and their roots
Test a number for a perfect square or cube from its prime factors, find the least number to multiply, divide, add or subtract to make one, read square and cube roots from the exponents, and use last digits to rule out squares and find cube roots quickly.
Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.
You will learn to
- Test whether a number is a perfect square or a perfect cube by checking the exponents in its prime factorisation.
- Find the least number by which a number must be multiplied or divided to make a perfect square or a perfect cube.
- Work out the square root or cube root of a perfect square or perfect cube by halving its prime exponents or dividing them by 3.
- Find the least number to add to or subtract from a number to make a perfect square, as in arranging people in a square formation.
- Use last digits to rule out perfect squares and to find the cube root of a 4- to 6-digit perfect cube.
Before you start
A perfect square is a whole number that equals some whole number times itself, such as 49 = 7 x 7 = 7^2. A perfect cube is the product of three equal whole numbers, such as 64 = 4 x 4 x 4 = 4^3. The squares from 1^2 to 10^2 are 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100, and the cubes from 1^3 to 10^3 are 1, 8, 27, 64, 125, 216, 343, 512, 729 and 1000. You also need to write a number as a product of primes. One easy way is to keep dividing by the smallest prime that goes in exactly and to record repeated primes as powers, for example 360 = 2^3 x 3^2 x 5. Square roots here always mean the positive root. Roots of numbers that are not perfect squares, and simplifying surds, belong to the surds lesson.
The exponent test for squares and cubes
Squaring a number doubles every exponent in its prime factorisation, and cubing it triples every exponent. So a number is a perfect square exactly when every prime in it has an even exponent, and a perfect cube exactly when every exponent is a multiple of 3. The root can be read from the same list: halve each exponent for the square root, or divide each exponent by 3 for the cube root. For example, 3,969 = 3^4 x 7^2 has only even exponents, so sqrt(3969) = 3^2 x 7 = 63. Next, 10,648 = 2^3 x 11^3, so its cube root is 2 x 11 = 22. A number such as 46,656 = 2^6 x 3^6 passes both tests, being 216^2 and also 36^3. On the other hand, 5,000 = 2^3 x 5^4 fails both: the exponent 3 on the 2 is odd, and the exponent 4 on the 5 is not a multiple of 3.
The least number to multiply or divide by
When some exponents do not fit, either supply the missing primes or take away the extra ones. For a perfect square, list the primes whose exponents are odd. Multiplying by their product makes every exponent even, and so does dividing by it. Take 1,800 = 2^3 x 3^2 x 5^2. Only 2 has an odd exponent, so 1,800 x 2 = 3,600 = 60^2 and 1,800 / 2 = 900 = 30^2. For a perfect cube, look at the remainder when each exponent is divided by 3. A remainder of 1 needs two more copies of that prime and a remainder of 2 needs one more; to divide instead, take away the leftover copies. Take 1,125 = 3^2 x 5^3. The 3 needs one more copy, so 1,125 x 3 = 3,375 = 15^3, while dividing by 3^2 = 9 leaves 125 = 5^3. These numbers are the least possible, because every prime that does not fit has to be corrected by at least that much.
The least number to add or subtract
Adding or subtracting can change the prime factors entirely, so here the factor method does not help. Instead, find the two perfect squares on either side of the number. Start from round squares such as 40^2 = 1,600, 50^2 = 2,500, 60^2 = 3,600 and 70^2 = 4,900, then step up one at a time. For 5,000: 70^2 = 4,900 is below it and 71^2 = 5,041 is above it. So the least number to subtract is 5,000 - 4,900 = 100, and the least number to add is 5,041 - 5,000 = 41. Subtracting always aims at the square just below the number, and adding aims at the square just above it. The same idea answers questions about arranging people or plants in a square, with as many rows as there are in each row: those left over give the number to subtract, and those still needed give the number to add.
Last digits, and cube roots at a glance
The last digit of a square depends only on the last digit of the number being squared, so a perfect square can end only in 0, 1, 4, 5, 6 or 9. A number ending in 2, 3, 7 or 8 is never a perfect square, and a square that ends in 0 must end in an even number of zeros, so 4,000 cannot be one. This test only rules numbers out: 26 ends in 6 but is not a square. Cubes are kinder, because each last digit of a cube comes from exactly one last digit of its root. The digits 0, 1, 4, 5, 6 and 9 stay the same, while 2 and 8 swap places, and so do 3 and 7. A perfect cube with 4 to 6 digits has a two-digit cube root. Read the units digit of the root from the last digit of the cube. Then strike off the last three digits and find the largest whole number whose cube is not more than what is left; that is the tens digit. For 74,088: the last digit 8 gives a units digit of 2; striking off 088 leaves 74, and 4^3 = 64 is the largest cube not above 74, so the cube root is 42.
Common mistakes
Multiplying by the whole number again, or by a prime more times than needed: the product is a perfect square, but the multiplier is not the least one. For cubes, multiplying by p when the exponent of p leaves a remainder of 1, when p^2 is needed. Taking an allowed last digit as proof: 2,116 ends in 6 and is 46^2, but 2,126 also ends in 6 and is not a square. Using the cube-root shortcut on a number that has not been shown, or stated, to be a perfect cube. Aiming at the square above when the question asks what to subtract, or the square below when it asks what to add. Halving only some exponents: the square root of 144 = 2^4 x 3^2 is 2^2 x 3 = 12, not 2^2 x 3^2 = 36. In formation questions, giving the number of rows when the question asks how many are left over.
A routine for squares and cubes
1. Write the number as a product of prime powers. 2. For a square, check that every exponent is even; for a cube, check that every exponent is a multiple of 3. 3. If not, find the least multiplier or divisor from the exponents that do not fit. 4. For a root, halve the exponents or divide them by 3, then multiply back. 5. For add or subtract questions, trap the number between two neighbouring squares. 6. Use the last digit to rule out squares or to start a cube root, and confirm the final answer by squaring or cubing.
Worked examples
A builder in Mysuru buys square floor tiles in boxes of 2,352. What is the least number of full boxes he must use if all the tiles in them are to be laid as one large square, with as many rows as tiles in each row? Each tile is 25 cm wide; how long is each side of the square floor?
- Prime factors: 2,352 = 2^4 x 3 x 7^2.
- The exponents of 2 and 7 are even, but 3 appears only once, so the number of tiles must be multiplied by 3 to make every exponent even.
- 3 boxes hold 2,352 x 3 = 7,056 = 2^4 x 3^2 x 7^2 tiles. Halving the exponents gives sqrt(7056) = 2^2 x 3 x 7 = 84.
- Each side has 84 tiles of 25 cm, that is 84 x 25 = 2,100 cm = 21 metres. Check: 84 x 84 = 7,056.
Answer: 3 boxes; the square is 84 tiles by 84 tiles, 21 metres along each side.
A toy shop in Surat sells packs of 1,350 identical small wooden cubes. What is the least number of packs needed to build one solid cube that uses every small cube in them, and how many small cubes long is each edge?
- Prime factors: 1,350 = 2 x 3^3 x 5^2.
- For a cube every exponent must be a multiple of 3. The exponent of 3 already is; 2 (exponent 1) needs two more copies and 5 (exponent 2) needs one more.
- So the least number of packs is 2^2 x 5 = 20, giving 1,350 x 20 = 27,000 = 2^3 x 3^3 x 5^3 small cubes.
- Divide the exponents by 3: the cube root is 2 x 3 x 5 = 30. Check: 30 x 30 x 30 = 27,000.
Answer: 20 packs, making a solid cube 30 small cubes along each edge.
A gardener in Ooty has 6,000 rose plants to set out in a square, with as many rows as plants in each row. (a) If he makes the largest square he can, how many plants are left over? (b) If he buys extra plants at Rs. 40 each to make the next larger square, how many must he buy and what do they cost?
- Round squares first: 70^2 = 4,900 and 80^2 = 6,400, so the side is between 70 and 80.
- Step up: 77^2 = 5,929 is below 6,000 and 78^2 = 6,084 is above it.
- (a) A square of 77 rows of 77 uses 5,929 plants, leaving 6,000 - 5,929 = 71.
- (b) A square of 78 rows of 78 needs 6,084 plants, so he must buy 6,084 - 6,000 = 84, costing 84 x 40 = Rs. 3,360.
Answer: (a) 71 plants are left over. (b) He must buy 84 plants, costing Rs. 3,360.
Practice checks
- What is the least number by which 2,880 must be divided so that the quotient is a perfect square?
- A drill teacher in Kota has 2,000 cadets and wants them in a solid square, with as many rows as cadets in each row. What is the least number of cadets who must be left out?
- 157,464 is a perfect cube. What is its cube root?
- Exactly one of these numbers is a perfect square. Which one is it?
- What is the least number by which 8,232 must be divided so that the quotient is a perfect cube?
Sources checked
- SSC CGL Scheme and Syllabus, labelled 2024 — Tier-I Quantitative Aptitude and Tier-II Mathematical Abilities (Square roots; computation of whole numbers); not verified as the full 2026-cycle syllabus
- OpenStax, Prealgebra 2e — Section 2.5, writing a composite number as a product of primes by the factor tree and ladder methods, in exponential form; used here as the starting point for the exponent tests; mathematical relationships only
- OpenStax, Intermediate Algebra 2e — Section 8.1, the square of a number and its square root, the positive (principal) square root, cube roots, and placing a root between two consecutive perfect squares or perfect cubes; the exponent tests, least multipliers and divisors, last-digit patterns and the cube-root shortcut are worked out in this lesson; mathematical relationships only