Combinatorics - How many numbers between 1 and 10000 are not squared or cubed?

2.4k Views Asked by At

Simple question.

How many numbers between 1 and 10000 can't be written as $n^2$ or $n^3$ when $n \in \mathbb N$?

I know the way to solve this is with inclusion-exclusion. but for that I need to find the cardinality of these sets:

1) The set of all numbers between 1 to 10000 that can be written as $n^2$

2) The set of all numbers between 1 to 10000 that can be written as $n^3$

3) The set of all numbers between 1 to 10000 that can be written as $n^6$

How do I find out how many elements are in those sets?

2

There are 2 best solutions below

0
On BEST ANSWER

Let $m_2$ be greatest such that $m_2^2 \le 10000$, then there are $m_2$ squares between $1$ and $10000$, because if we list all the squares we have $$\underbrace{1^2,\ 2^2,\ \dots, (m_2-1)^2,\ m_2^2}_{\le 10000},\ \underbrace{(m_2+1)^2,\ (m_2+2)^2,\ \cdots}_{>10000}$$ Define $m_3$ and $m_6$ similarly, and then apply inclusion-exclusion.

4
On

HINT:

We need to exclude $n$ such that $(n^2\le 10000)+(n^3\le1000)-(n^6\le10000)$