A natural number is called a square if it can be written as the product of two equal numbers. For example, 9 is a square, since $9=3 \times 3$. The first squares are 1, 4, 9, 16, 25, ... A natural number is called a cube if it can be written as the product of three equal numbers. For example, 8 is a cube, since $8=2 \times 2 \times 2$. The first cubes are $1,8,27,64,125 \ldots$

One day, the square and cube numbers decided to go on strike. This is how the other natural numbers had to take new positions:

![](https://cdn.mathpix.com/cropped/2024_05_01_d18780f0fd52e0502cf8g-21.jpg?height=113&width=1082&top_left_y=763&top_left_x=544)

a) What is the number that ended up in the $12^{\text {th }}$ position?

b) What are the numbers less than or equal to 2013 that are both squares and cubes?

c) What is the new position occupied by the number 2013?

d) Find out which number ended up in the $2013^{\text{th}}$ position.
Solution

a) Let's underline the numbers that are squares or cubes:

$$
\underline{\underline{1}}, 2,3, \underline{\underline{4}}, 5,6,7, \underline{\underline{8}}, \underline{\underline{9}}, 10,11,12,13,14,15, \underline{\underline{16}}, 17, \ldots
$$

Counting the positions of the numbers that were not underlined, we observe that the number in the $12^{\mathrm{th}}$ position is the number 17.

b) Note that $12^{3}<2013<13^{3}$. Thus, the cubes less than or equal to 2013 are:

$$
1^{3}, 2^{3}, 3^{3}, 4^{3}, 5^{3}, 6^{3}, 7^{3}, 8^{3}, 9^{3}, 10^{3}, 11^{3}, 12^{3}
$$

We need to find which of these are also squares.

Clearly, $1^{3}=1=1^{2}$, so 1 is also a square.

Note that $2^{3}=2 \times 2 \times 2$ cannot be a square, since it is a product of an odd number of the prime factor 2. For similar reasons, $3^{3}, 5^{3}, 7^{3}$, and $11^{3}$ cannot be squares. Similarly, $8^{3}=\left(2^{3}\right)^{3}=2^{9}$ is a product of an odd number of the prime factor 2.

We have that

$$
4^{3}=\left(2^{2}\right)^{3}=2^{6}=\left(2^{3}\right)^{2}=8^{2}
$$

Thus, $4^{3}=8^{2}=64$ is both a cube and a square.

Similarly, we have that

$$
9^{3}=\left(3^{2}\right)^{3}=3^{6}=\left(3^{3}\right)^{2}=27^{2}
$$

Thus, $9^{3}=27^{2}=729$ is both a cube and a square.

Finally, we have that $6^{3}=(2 \times 3)^{3}=2^{3} \times 3^{3}$ cannot be a square, since its prime factorization contains the term $3^{3}$, which is not a square. For the same reason, $12^{3}=(4 \times 3)^{3}=2^{6} \times 3^{3}$ is not a square.

We conclude that the only numbers less than or equal to 2013 that are both squares and cubes are 1, 64, and 729.

c) Observe that

$$
44^{2}<2013<45^{2} \text { and } 12^{3}<2013<13^{3}
$$

This shows that, in the set $\{1,2, \ldots, 2013\}$, there are 44 squares and 12 cubes. Among them, there are numbers that are both squares and cubes. From the previous item, these numbers are $1^{6}, 2^{6}$, and $3^{6}$. We conclude that there are $44+12-3=53$ numbers in the set $\{1,2, \ldots, 2013\}$ that are on strike. Therefore, the number 2013 will occupy the position of number $2013-53=1960$.

d) We saw in the previous item that the number 2013 will occupy the position $2013-53=1960$. To find the new number that occupies the $2013^{\text{th}}$ position, we need to study the following 53 positions. The first squares greater than 2013 are $45^{2}=2025$ and $46^{2}=2116$, while the first cube greater than 2013 is $13^{3}=2197$. Thus, among the numbers $\{2013+1, \ldots, 2013+53\}$, only the number 2025 is on strike. Therefore, the new position of the number $2013+53$ will be $1960+53-1=2012$. We conclude that the number in the 2013th position is the number $2013+53+1=2067$.