A function F is such that this relationship holds for all real x.
F(x) = F(398-x) = F(2158-x) = F(3214-x)
What is the maximum number of distinct values that can appear in the list F(0), F(1), F(2), ..., F(999).
Well, now that I see what is going on, a simpler explanation is available. Here it is.
f(1) = f(397).
But f(x) = f(2158-x), so f(397) = f(1761)
In general, f(x) = f(1760 + x), so the values repeat with a cycle of 1760
Also, f(x) = f(3214-x), so f(397) = f(2817)
In general, f(x) = f(2816 + x), so the values also repeat with a cycle of 2816
If 1760 and 2816 were relatively prime, then there would only be one possible value for integer values of x, but this is not the case.
Their greatest common divisor is 352, so the values repeat with a cycle of 352. Half the cycle is 176.
And because f(x) = f(398-x), the function is symmetric around x = 199. Therefore, in the range from 199 +/- 176, function values to the left of 199 necessarily are the same as function values to the right of 199. Maximum number of distinct values = 176 + 1, where the 1 is f(199) itself.