Let us make the problem more general in the sense that the summation will be from i=1 to i=N and that you want to exclude terms following the kind of pattern you gave.
For the summation, just use the classical formula given by dato datuashvili.
Now, the numbers you exclude in your problem follow the general equation
j(i) = - 5 + 83 i / 6 - 5 i^2 + 7 i^3 / 6
You could easily check that, whatever "i" could be, j(i) is an integer.
So, from the total summation, you must exclude the sum of the cubes of j(i) for i running from 1 to p. If you expand the cube of j(i), you end with sums of i^n (n running from 1 to 9) and i from 1 to p. Each of this sums as a closed form; it is even possible to directly establish for your case that the sum of the cubes of excluded terms is given by
p (-2246400 - 2820636 p + 10899980 p^2 + 4880645 p^3 - 6655740 p^4+ 4947222 p^5 -
- 1908660 p^6 + 543165 p^7 - 89180 p^8 + 9604 p^9) / 60480
Applied to your problem (p=4), this gives for the sum of the excluded terms the value of 105145 which is correct.