What is the sum of all integers between 1 and 6000 which are aren't divisible by 5 or 4?
The only method I could think of is finding all the multiples of 4 and 5 between 1 and 6000 and adding them together. Then finding the sum of all the numbers from 1 to 6000 and subtracting the other sum from this sum to find the answer. But this method isn't at all efficient so can you please help me in finding a method that is efficient?