How many integers from 1 to 1 0 6 inclusive are neither perfect squares nor perfect cubes nor perfect fourth powers?
Enter your answer as the digit sum of the required number. For example the digit sum of 1 7 2 9 = 1 + 7 + 2 + 9 = 1 9
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Python 2.7:
1 2 3 4 5 6 7 8 |
|
Number of perfect squares = 1 0 0 0 Since we know that 1 0 0 0 2 = 1 0 6
Number of perfect cubes = 1 0 0 Since we know that 1 0 0 3 = 1 0 6 But we have already counted 1 hence we have 9 9
Number of perfect fourth powers = 3 1 Since 3 1 4 is the closest to 1 0 6 But we have already counted these fourth powers in the squares. Hence we have 0
Total = 1 0 0 0 + 9 9 + 0 = 1 0 9 9
1 0 6 − 1 0 9 9 = 9 9 8 9 0 1
9 + 9 + 8 + 9 + 1 = 3 6
You need to consider the cases when n 2 = m 3
Problem Loading...
Note Loading...
Set Loading...
for each integer n from 1 to 1000 there is a number n 2 that is a perfect square less than or equal to 1,000,000 so there are 1000 perfect squares
for each integer m from 1 to 100 there is a number m 3 that is a perfect cube that is equal to or less than 1,000,000 so there are 100 perfect cubes
how many of these perfect cubes are also perfect squares?
integers raised to the sixth power will be both perfect squares and perfect cubes; there are ten of these ( 1 6 , 2 6 , 3 6 , . . . 1 0 6 ) that produce numbers in this range
so there are 1000 + 100 - 10 = 1090 separate numbers that are either perfect squares or cubes in the given range
meaning that 1,000,000 - 1090 = 998,910 are neither perfect squares or cubes