4. It is known that the prime factorization of 2013=3×11×61.
Let p1=3,p2=11,p3=61.
For a,b∈{1,2,⋯,2013}, let
a≡ai(modpi),b≡bi(modpi),
where i=1,2,3.
By the Chinese Remainder Theorem, we know that (a,b) and (a1′,a2,a3, b1,b2,b3) are in one-to-one correspondence.
Let fi(x)=aix3+bix(i=1,2,3).
A polynomial is called a "good polynomial modulo n" if f(0),f(1),⋯,f(n−1) have distinct remainders modulo n.
If f(x)=ax3+bx is not a good polynomial modulo 2013, then there exist x1=x2(mod2013) such that
f(x1)≡f(x2)(mod2013).
Assume x1=x2(modpi), and let u1,u2 be the remainders of x1 and x2 modulo pi. Then
u1≡u2(modpi),
and fi(u1)≡fi(u2)(modpi).
Thus, fi(x) is not a good polynomial modulo pi.
If f(x)=ax3+bx is a good polynomial modulo 2013, then each fi(x) is a good polynomial modulo pi.
In fact, for any different
r1,r2∈{0,1,⋯,pi−1},
there exist x1,x2∈{1,2,⋯,2013} such that
x1≡x2(modpi2013)
and x1≡r1(modpi),x2≡r2(modpi).
Since f(x1)=f(x2)(mod2013) and
f(x1)≡f(x2)(modpi2013),
it follows that f(r1)=f(r2)(modpi), and the conclusion holds.
Therefore, the problem reduces to finding the number of good polynomials fi(x) modulo pi.
For p1=3, by Fermat's Little Theorem, we have
f1(x)≡a1x+b1x≡(a1+b1)x(mod3)
is a good polynomial if and only if a1+b1 is not a multiple of 3, and there are 6 such f1(x).
For i=2,3, if fi(x) is a good polynomial modulo pi,
then for any u,v≡0(modpi),
fi(u+v)≡fi(u−v)(modpi)
⇒pi∤[fi(u+v)−fi(u−v)]
⇒pi∤2v[ai(3u2+v2)+bi].
If ai=0, the sets
A={3aiu2∣u=0,1,⋯,2pi−1}
and B={−bi−aiv2∣v=1,2,⋯,2pi−1},
have non-overlapping remainders modulo pi.
Clearly, the elements of sets A and B are distinct modulo pi, and ∣A∣+∣B∣=pi, so the pi elements of A∪B have remainders that are a permutation of 0,1,⋯,pi−1, and thus their sum is a multiple of pi, i.e.,
u=0∑2pi−13aiu2+v=1∑2pi−1(−bi−aiv2)≡0(modpi).
Notice that,
12+22+⋯+(2pi−1)2=61×2pi−1×2pi+1pi
is a multiple of pi, so −2pi−1bi is also a multiple of pi. Thus, bi is a multiple of pi, meaning that at least one of ai or bi is 0, and they cannot both be 0.
If ai=0,bi=0, then fi(x)=bix is clearly a good polynomial.
Thus, there are pi−1 such good polynomials.
If ai=0,bi=0, then fi(x)=aix3.
For p2=11, by Fermat's Little Theorem, we have
(x3)?=x21≡x(mod11).
Thus, for x1≡x2(mod11),x13≡x23(mod11), f2(x)=a2x3 is a good polynomial.
Thus, there are 10 such good polynomials.
For p3=61, since
43=64≡125=53(mod61),
f3(x)=a3x3 is not a good polynomial.
In summary, the number of polynomials f(x) is
6×(10+10)×60=7200.