How many integers between 1 and 10,000 are neither squares nor cubes?

14.3k Views Asked by At

Question in proofs class. No idea how to figure this one out. I've been giving all questions an honest effort - this seems unorthodox.

Please help get me started

1

There are 1 best solutions below

1
On

Squares: $1^2,2^2,...,100^2 \Rightarrow$ we have 100 squares.

Cubes: $1^3,2^3,..., \lfloor \sqrt[3] {10000} \rfloor^3=21^3=9261 \Rightarrow$ we have 21 cubes.

Numbers that are squares and cubes: $1^6,2^6,..., \lfloor \sqrt[6] {10000} \rfloor^6=4^6=4096 \Rightarrow$ we have 4 numbers that are squares and cubes.

By inclusion-exclusion principle, follow that we have $10000-100-21+4=9883$ number which are neither squares nor cubes.