The quadratic x2+x+1=0 has roots that are the non-real cube roots of unity.
Let one root be α. Then
α2+α+1=0⟹α3=1,α=1
Because α3=1, all integral powers of α repeat every three steps:
αk=⎩⎨⎧1αα2if k≡0(mod3)if k≡1(mod3)if k≡2(mod3)
Also α−1=α2,α−2=α,α−3=1, so α−k follows the same cycle.
Define Tk=(αk+αk1)2. Evaluate Tk for the three possible residues of k modulo 3:
Case 1: k≡0
αk=1,αk1=1⇒Tk=(1+1)2=4
Case 2: k≡1
αk=α,αk1=α2⇒α+α2=−(1)(from α2+α+1=0)
Tk=(−1)2=1
Case 3: k≡2
αk=α2,αk1=α⇒α2+α=−1
Tk=(−1)2=1
Thus the sequence T1,T2,T3,… is periodic with cycle {1,1,4}, whose sum is
1+1+4=6
Let n=3q+r where r∈{0,1,2}. Then
∑k=1nTk=6q+⎩⎨⎧011+1=2(r=0)(r=1)(r=2)
The given condition is
6q+{0,1,2}=20
Check the three possibilities:
• 6q=20 (impossible)
• 6q+1=20⇒6q=19 (not an integer)
• 6q+2=20⇒6q=18⇒q=3
The valid case is q=3,r=2. Hence
n=3q+r=3⋅3+2=11
Therefore, the required value of n is 11.