Wednesday, December 17, 2008

How many natural numbers less than 1 million are either cubes or squares of natural numbers?

How many natural numbers less than 1 million are either cubes or squares of natural numbers?

1,000,000 = (10^2)^3 = (10^3)^2 = 10^6

So thus there are 10^2 cubes less than or equal to 1,000,000

and 10^3 squares less than or equal to 1,000,000

and there are 10 natural numbers n^6 that are both squares and cubes. (1^6,2^6,3^6,etc...)

So first we get the number of cubes 10^2 = 100
and add it to the number of squares 10^3 = 1000
and then subtract the 10 that were over counted, in either group. 1000+100-10=1090 squares and cubes less than or equal to 1 million

No comments: