The two excellent number theory books I keep recommending (for self study or help with the basics) are Weissman: An Illustrated Theory of Numbers. Lehman: Quadratic Number Theory: An Invitation to Algebraic Methods in the Higher Arithmetic. The web pages are