Use cotu−cotv=sinusinvsin(v−u). With v=u+6π,sin(v−u)=21, so each summand is 2[cot(4π+6(r−1)π)−cot(4π+6rπ)]. None of the sine denominators is zero.
The sum telescopes to 2[cot(4π)−cot(4π+613π)]. Cotangent has period π, and 4π+613π=2π+125π.
Now cot(4π)=1 and cot(125π)=cot75∘=2−3. Hence the sum is 2(3−1)=23−2, so a=2,b=−2 and a2+b2=8.