# Two Dirichlet characters $\chi$, $\chi'$ are equal if $\chi(p) = \chi'(p)$ for almost all primes

I want to prove the following: Let $\chi, \chi'$ be two primitive Dirichlet-characters of conductor $N$. Suppose that $\chi(p) = \chi'(p)$ for all but a finite number of primes $p$. Then $\chi = \chi'$.

My idea was to use the same trick as in Euclid's proof of the infinitude of primes. Let $p_1, ..., p_n$ be the (pairwise distinct) primes not dividing $N$ such that $\chi(p_i) \neq \chi'(p_i)$. Then $p_1 \cdots p_n + N$ is coprime to $N$ and no $p_i$ divides $p_1 \cdots p_n + N$. So $\chi(p_1 \cdots p_n + N) = \chi'(p_1 \cdots p_n + N)$. Now I thought we can use the fact that $p_1 \cdots p_n + N$ is a unit in $\mathbf{Z} / N\mathbf{Z}$, but I couldn't get my head around that.

Does anyone know how to do it?

Thanks!

You only need to check that $\chi(a)=\chi'(a)$ for every $a\in(\mathbb{Z}/N\mathbb{Z})^\times$. By Dirichlet's theorem, there exists a prime $p\equiv a\bmod N$ such that $\chi(p)=\chi'(p)$. Repeat this for every $a$ and you are done.
• @Steven I doubt it. For example, take $N=3$, then all the primes are $1\bmod 3$ or $-1\bmod 3$. If the hypothesis tells you that the equality occurs for almost all the primes of the second form, then you are happy: take one such prime to establish the equality for $a=-1$ and then two of these for $a=1$. However, if the hypothesis only tells you that the equality occurs for primes $1\bmod 3$, then you don't have any information about the case $a=-1$. This does not prove anything, but I would be rather surprised if that sort of proof you are asking existed. – Lukas May 3 '17 at 10:21