A very well known theorem pertaining on Dirichlet characters sums states that if $\chi$ is a Dirichlet character modulo $k$, defining
$$ A\left(n\right)=\sum_{d\mid n}\chi\left(d\right) $$
Then $A\left(n\right)\geq0$ for all $n$, and $\left(n\right)\geq1$ if $n$ is a square.
Let's apply the theorem, with $k=7$, so with integers under multiplication modulo 7, and we build an $n$ as follows: $$n=2^2\cdot3^2=6^2$$ so it is a square.
Divisors of $6^2$ are 2, 3, 4, 6, 9, 12, 18, and 36, which are congruent, modulo 7, respectively to 2, 3, 4, 6, 2, 5, 4, and 1.
A real-valued Dirichlet character for multiplication $\mod 7$ maps the classes 1 to 6 respectively to 1, 1, -1, 1, -1, -1; so we have:
$$ A(36)=\chi\left(2\right)+\chi\left(3\right)+\chi\left(4\right)+\chi\left(6\right)+\chi\left(2\right)+\chi\left(5\right)+\chi\left(4\right)+\chi\left(1\right)=1-1+1-1+1-1+1+1=2 $$
However, during the proof of this theorem, it is shown that if $p$ is a prime number, $A(p^a)=1$ if $a$ is even, 0 otherwise.
So, since $A$ is multiplicative, it should be:
$$ A(6^2)=A(3^2)A(2^2)=1\cdot1=1 $$
which is different from the value I have found before. My question is: where did I do the mistake?
Thanks.
Suppose $\chi(p)=1$ for a prime $p$. Enumerating the divisors of $p^a$ is easy. You will find $A(p^a)=a+1$. In your example, $A(2^2)=3$, not $1$.
Also, do not forget that $1$ is a divisor of $36$ too, so $A(36)=3$.
This should clarify the situation.