Filter. Using the hint,
j=0∑2(1+ωj)n=k=0∑n(kn)j=0∑2ωjk=33∣k∑(kn)=3Sn.
Evaluating. 1+ω=−ω2=eiπ/3 and 1+ω2=e−iπ/3. Hence
3Sn=2n+einπ/3+e−inπ/3=2n+2cos3nπ.
2. 2024=6⋅337+2, so cos32024π=cos32π=−21 and
S2024=322024−1.
Check. n=6: (06)+(36)+(66)=1+20+1=22, and the formula gives 364+2=22 ✓.
Lesson. The roots of unity filter m1∑j=0m−1ωjk=[m∣k] extracts the terms whose index lies in a given residue class.