Find the sum of all integers between 1 and 9999 that are divisible by 5 but not by 6 nor 7.
Any help is greatly appreciated!
> 9999/5.;
1999.8
> 9999/30.;
333.3000000
> 9999/35.;
285.6857143
> 9999/210.;
47.61428571
> 1999*(1+1999)/2*5;
9995000
> 333*334/2*30;
1668330
> 285*286/2*35;
1426425
> 47*48/2*210;
236880
> 9995000-1668330-1426425+236880;
7137125
Thanks buggler@Undernet for the help on this method.