Lagnever AI Hinglish

Patterns in squares and cubes

Answer in short

Squares end only in 0, 1, 4, 5, 6 or 9, but cubes can end in any digit. Adding odd numbers from 1 gives the squares, and odd numbers in groups of 1, 2, 3, … give the cubes. Two neighbouring triangular numbers make a square, and 1729 is the smallest sum of two cubes in two ways.

Stuck on a question? Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2. Get it on Google Play

What can the last digit tell you?

Square the digits 0 to 9 and look only at the last digit of each answer: 0, 1, 4, 9, 6, 5, 6, 9, 4, 1. So every square ends in 0, 1, 4, 5, 6 or 9, and a number ending in 2, 3, 7 or 8, such as 2048 or 1027, cannot be a square. The rule only works one way: 26 ends in 6 but is not a square.

The pairs are worth noticing. A square ends in 1 when the number ends in 1 or 9 (21² = 441, 29² = 841), and in 6 when the number ends in 4 or 6 (24² = 576, 26² = 676). Zeros double when you square: 30² = 900 and 300² = 90,000, so a square always ends in an even number of zeros. Parity stays too: an even number has an even square and an odd number an odd one.

The last digit of a square for each last digit 0 to 9, with notes on zeros and parity
The last digit of a square

Cubes behave differently. Cubing 0 to 9 gives last digits 0, 1, 8, 7, 4, 5, 6, 3, 2, 9: every digit appears once. So a cube can end in any digit, and the last digit of a cube tells you the last digit of its cube root. Zeros at the end of a cube come in threes (20³ = 8000), so no cube ends in exactly two zeros.

The last digit of a cube for each last digit 0 to 9; 2 and 8, and 3 and 7, swap
The last digit of a cube

How do odd numbers build squares?

Look at the differences between neighbouring squares: 4 − 1 = 3, 9 − 4 = 5, 16 − 9 = 7, 25 − 16 = 9. They are the odd numbers. Turned around, adding odd numbers from 1 gives the squares: 1 + 3 + 5 + 7 + 9 = 25 = 5². In a dot picture, each new odd number is an L-shaped band that wraps around the last square.

The n-th odd number is 2n − 1, so (n + 1)² = n² + 2n + 1. For example, 20² = 400, so 21² = 400 + 41 = 441.

A 5 by 5 square of dots made of L-shaped bands of 1, 3, 5, 7 and 9 dots
Odd numbers build squares

How many numbers lie between two squares?

From n² to (n + 1)² the jump is 2n + 1, so exactly 2n numbers lie strictly between them. Between 8² = 64 and 9² = 81 there are 16 numbers, 65 to 80. Because the gaps keep growing, squares become rarer: there are 10 squares from 1 to 100 but only 1 from 901 to 1000, and the largest square below 1000 is 31² = 961.

Bars showing 10, 4, 3, 3, 2, 2, 2, 2, 2 and 1 squares in each hundred from 1 to 1000
How many squares in each hundred?

What do triangular numbers have to do with squares?

Triangular numbers, 1, 3, 6, 10, 15, 21, …, count dots arranged in a triangle. Add two neighbours and you always get a square: 1 + 3 = 4, 3 + 6 = 9, 6 + 10 = 16, 10 + 15 = 25. In a square of dots, a staircase cut separates the two triangles.

A 5 by 5 square of dots split along a staircase into 10 and 15 dots
Two triangular numbers make a square

How do odd numbers build cubes?

Take the odd numbers in groups of 1, 2, 3, 4, …: 1 = 1³, 3 + 5 = 8 = 2³, 7 + 9 + 11 = 27 = 3³, 13 + 15 + 17 + 19 = 64 = 4³. Group n has n odd numbers whose middle is n², so it adds up to n × n² = n³. The tenth group, 91 + 93 + … + 109, has middle 100, so its sum is 1000 = 10³.

Rows of consecutive odd numbers adding up to 1, 8, 27, 64 and 125, and row 10 adding up to 1000
Odd numbers in groups make cubes

What are successive differences?

Write the squares, then the differences between neighbours, then the differences of those. For squares, level 1 is 3, 5, 7, 9, … and level 2 is all 2. For cubes it takes one more level: 7, 19, 37, 61, … then 12, 18, 24, … and then 6, 6, 6. Working backwards from the constant level lets you predict the next term.

Successive differences of squares, constant at level 2, and of cubes, constant at level 3
Successive differences

What is a taxicab number?

A number that can be made by adding two positive cubes in two different ways is a taxicab number. The smallest is 1729 = 1³ + 12³ = 9³ + 10³, which Ramanujan spotted when Hardy came to see him in taxi number 1729. The next two are 4104 = 2³ + 16³ = 9³ + 15³ and 13832 = 2³ + 24³ = 18³ + 20³.

1729, 4104 and 13832, each written as a sum of two cubes in two ways
Taxicab numbers: two cubes, two ways

Read next: square numbers and square roots, cube numbers and cube roots, the chapter notes and NCERT solutions.

Practice

  1. Which of these numbers can be a perfect square?

    1. (a) 5832
    2. (b) 4237
    3. (c) 6561
    4. (d) 7778
    Show answer

    Answer: (c) 6561

  2. 1 + 3 + 5 + … + 29 (all odd numbers up to 29) equals:

    1. (a) 196
    2. (b) 225
    3. (c) 256
    4. (d) 289
    Show answer

    Answer: (b) 225

  3. How many zeros can a perfect cube end with?

    1. (a) Exactly 2
    2. (b) Any number
    3. (c) 0, 3, 6, …
    4. (d) Only 1
    Show answer

    Answer: (c) 0, 3, 6, …

  4. Without adding, find 57 + 59 + 61 + 63 + 65 + 67 + 69.

    Show answer

    Answer: These are 7 consecutive odd numbers with middle 63. The sum is 7 × 63 = 441 = 21². (They are not the 7th row of the cube pattern, which would start at 43 and add up to 343 = 7³.)

  5. Find the next number in 1, 8, 27, 64, 125, 216 using successive differences.

    Show answer

    Answer: Level 1: 7, 19, 37, 61, 91. Level 2: 12, 18, 24, 30. Level 3: 6, 6, 6. Extend level 3 with 6: level 2 becomes 36, level 1 becomes 127, and the next cube is 216 + 127 = 343 = 7³.

Questions students ask

Why does a square never end in 2, 3, 7 or 8?

The last digit of a square depends only on the last digit of the number. Squaring 0 to 9 gives last digits 0, 1, 4, 9, 6, 5, 6, 9, 4, 1, so 2, 3, 7 and 8 never appear.

Why is 1729 called the Hardy–Ramanujan number?

G. H. Hardy came to visit Srinivasa Ramanujan in a taxi numbered 1729 and called it a dull number. Ramanujan answered that no smaller number can be written in two ways as a sum of two cubes: 1³ + 12³ and 9³ + 10³.

What is the connection between odd numbers and square numbers?

The first n odd numbers add up to n²: 1 + 3 + 5 = 9 = 3². Each new odd number adds an L-shaped band of dots that turns a square into the next square.

Stuck on a question?

Take a photo and Lagnever AI explains it step by step. Try it for 7 days for ₹2.

Get it on Google Play Open in browser

For parents: after the trial, the plan renews monthly by UPI or card autopay. You can cancel anytime in the app.