\[\sum_{r=1}^{\phi\left(k\right)}\chi_{r}\left(m\right)\overline{\chi}_{r}(n)=%
\begin{cases}\phi\left(k\right),&m\equiv n\pmod{k},\\
0,&\mbox{otherwise}.\end{cases}\]