1. **Part (a): Prove that if n<2d, then ∑i=1dr(cai)≥n.**
Given n<2d, we need to show that ∑i=1dr(cai)≥n.
Since gcd(c,n)=1, the sequence r(c),r(2c),…,r((n−1)c) is a permutation of 0,1,…,n−1. This is because c is coprime with n, ensuring that multiplication by c permutes the residues modulo n.
Given a1,a2,…,ad are positive integers such that a1+a2+⋯+ad≤n−1, we have 0≤r(cai)≤n−1 for each i.
Since n<2d, we have d>2n. This implies that there are more than 2n terms in the sum ∑i=1dr(cai).
By the pigeonhole principle, since there are d terms and d>2n, at least one residue must appear more than once. This ensures that the sum of these residues must be at least n.
Therefore, ∑i=1dr(cai)≥n.
2. **Part (b): For each n, find the smallest d such that ∑i=1dr(cai)≥n always holds.**
We denote the minimum d for which the conclusion holds as d(n).
We claim the following:
d(n)={⌈2n⌉2⋅⌈6n⌉if 4∣n or n is odd,if 4∣n−2.
Proof:
- For n odd: Consider ai≡1 and c=2. Then r(cai)=r(2)=2. Since d≥⌈2n⌉, we have ∑i=1dr(cai)=2d≥n.
- For n divisible by 4: Let c=2n+1. Since gcd(c,n)=1, we can take ai≡2. Then r(cai)=r(n+2)=2. Thus, ∑i=1dr(cai)=2d≥n.
- For n≡2(mod4): Consider c=3. We need to show that d≥2⋅⌈6n⌉. If d≥2⋅⌈6n⌉, then ∑i=1dr(cai)≥n.
- For n≡0(mod3) and 4∣n−2: Consider c1=3n+1 and c2=32n+1. Since gcd(c1,n)=gcd(c2,n)=1, we can choose c such that r(cai)=3. Thus, d≥3n.
- For n≡1(mod3) and 4∣n−2: Consider c=3. We need to show that d≥3n+1. If d≥3n+1, then ∑i=1dr(cai)≥n.
Therefore, the smallest d such that ∑i=1dr(cai)≥n always holds is given by:
d(n)={⌈2n⌉2⋅⌈6n⌉if 4∣n or n is odd,if 4∣n−2.
The final answer is