Your solution seems correct.
----
This was a slighy modified problem from an AIME question.
We know f(0) is a zero.
Thus,
f(4) is a zero.
Thus,
f(10) is a zero.
Thus,
f(-6) is a zero.
Thus,
f(20) is a zero.
Thus,
f(-16) is a zero.
Thus,
f(30) is a zero.
....
The pattern is clear.
Similarly we get that,
f(14) is a zero.
Thus,
f(-10) is a zero.
Thus,
f(24) is a zero.
Thus,
f(-20) is a zero.
...
The pattern is clear.
Look at chart below.
RED: 4,-6,-16,...
BLUE: 14,24,34,...
GREEN: 10,20,30,...
GREY: -10,-20,-30,...
These are all arithmetic sequences.
Now we count how many are in this inteveral + 1 (because we never counted zero yet).
And also, these sequences are disjoint so we do not count the same thing twice. |