1. Define the generating functions:
Let f(x)=1+x+x2 and F(x)=f(x)f(x2)⋯f(xp−1). Then, F(x)=∑n=0p(p−1)anxn, where an is the number of (p−1)-tuples (x1,…,xp−1) with xj∈{0,1,2} such that x1+2x2+⋯+(p−1)xp−1=n.
2. **Count the tuples for E({0,1,2}):**
The number ∣E({0,1,2})∣ is the sum of an for n divisible by p. Using roots of unity, let ω=e2πi/p. We know that:
1+ωj+ω2j+⋯+ω(p−1)j={p0if p∣jif p∤j
Therefore, summing F(x) for x=1,ω,ω2,…,ωp−1:
F(1)+F(ω)+⋯+F(ωp−1)=p∣E({0,1,2})∣
Notice that F(1)=3p−1. For j=0modp, (1,ωj,ω2j,…,ω(p−1)j) is a permutation of (1,ω,ω2,…,ωp−1). Thus:
F(ω)=F(ω2)=⋯=F(ωp−1)=1
Hence:
p∣E({0,1,2})∣=3p−1+(p−1)⋅1
∣E({0,1,2})∣=p3p−1+p−1
3. **Count the tuples for E({0,1,3}):**
Let g(x)=1+x2+x3 and G(x)=g(x)g(x2)⋯g(xp−1). Similarly, we have:
∣E({0,1,3})∣=pG(1)+(p−1)G(ω)
G(1)=3p−1
We need to show that 1≤G(ω) and equality holds only for p=5.
4. **Analyze G(ω):**
Let h(x)=x3+x+1. The roots of h(x) are complex numbers λ,μ,ν with λ+μ+ν=0. We have:
G(ω)=j=1∏p−1(1+ωj+ω3j)=j=1∏p−1(ωj−λ)(ωj−μ)(ωj−ν)
Using the identity ∏j=1p−1(x−ωj)=x−1xp−1 for x=λ,μ,ν:
G(ω)=(λ−1λp−1)(μ−1μp−1)(ν−1νp−1)
Since (λ−1)(μ−1)(ν−1)=−h(1)=−3, we have:
(λp−1)(μp−1)(νp−1)=−3
Given λ3+λ+1=0, for all natural numbers k, λk+3+λk+1+λk=0. By induction, λr+μr+νr∈Z.
5. **Show G(ω)≥1:**
Assume G(ω)=1. Then:
(λp−1)(μp−1)(νp−1)=−3
The roots λp,μp,νp satisfy m(x)=x3−qx2+(1+q)x+1=0 with q=λp+μp+νp∈Z. Since λ is the real root of x3+x+1=0 and −1<λ<−21, if q<0, then m(λp)=0, leading to a contradiction. Thus, 1≤q.
6. **Special case for p=5:**
For p=5, g(ω)=1+ω+ω2=−ω2(1+ω2), and:
G(ω)=j=1∏p−1(1+ω2j)=j=1∏p−1(1+ωj)=1−(−1)1−(−1)p=1
Therefore:
∣E({0,1,3})∣=p3p−1+(p−1)G(ω)=p3p−1+p−1
Hence, ∣E({0,1,3})∣=∣E({0,1,2})∣ for p=5.
7. Conclusion:
For p>3, ∣E({0,1,3})∣≥∣E({0,1,2})∣ with equality if and only if p=5.
■