i would like to sum n=0 to n=(some value) over all integers except those that are generated by some function with integer inputs and outputs, like f[n]=(n^2+3n)/2
so it would sum when n=0, n=1, skip n=2, n=3, n=4, skip n=5 ...
the best I've been able to do so far is make a range for both values, then delete my special cases from the first list, but I feel there is a better, more mathematical way to do this so i can start playing with limits and other fun stuff.