The original references are:
- S. Selberg [Math. Z. 44 (1939), 306–318; zbMATH:0019.39308]
- S. S. Pillai [Proc. Indian Acad. Sci. Sect. A. 11 (1940), 13–20; zbMATH:66.0168.01, MR0001761].
Interestingly (I was not aware of this until I looked it up right now), the Selberg here is Sigmund Selberg, the older brother of the more famous Atle Selberg. Selberg's paper is in German, but Pillai's is in English.
You could also look at more modern references which might be easier to read. An application of Weyl's criterion and the (Atle!) Selberg-DelagneDelange method is what you need, see for example, this answer of mine.