What is a good book to learn number theory? What would be a good book to learn basic number theory? If possible a book which also has a collection of practice problems? Thanks.
 A: My two-pennyworth:


*

*John Stillwell, Elements of Number Theory (Springer 2002). This is by a masterly expositor, and is particularly approachable.

*G.H. Hardy and E.M. Wright, An Introduction to the Theory of Numbers (OUP 1938, and still going strong with a 6th edition in 2008). Also aimed at beginning undergraduate mathematicians and pleasingly accessible.

*Alan Baker, A Comprehensive Course in Number Theory (CUP 2012) is a nice recent textbook (and a lot shorter than its title would suggest, too).

A: I am surprised no one has mentioned Elementary Number Theory by David M. Burton yet.
This book is easy to follow, has lots of illustrative examples, and also comes with a bunch of exercises/practice problems at the end of each section.
In fact, it was exactly this book that introduced me to the topic of odd perfect numbers back in the year $1999$.
A: In my undergrad, we used Elementary Number Theory by Kenneth Rosen for our upper level (junior/senior) number theory course. There is also a solutions manual out there, which may be useful if you are self studying the book. To get the most out of the book, you should probably be familiar with the structure of mathematical proofs. For this I recommend the excellent (and free) Mathematical Reasoning Writing and Proof by Ted Stundstrom available here.
If you want something more basic, Discrete Mathemtics, also by Kenneth Rosen (particularly the first 4 chapters) would also be a good read. It covers proof writing (i.e. creating formal mathematical arguments), elementary mathematical structures (sets, functions), as well as some basic number theory such as:


*

*Divisibility and Modular Arithmetic

*Integer Representations and Algorithms

*Primes and Greatest Common Divisors

*Solving Congruences

*Applications of Congruences

*Cryptography

A: I would recommend the dover book $\mathit{Number\,\,Theory}$ by George R. Andrews, which is extremely friendly too beginners but also does a good job at giving an overview of all topics in the general "elementary number theory" umbrella.
Counting exercises its a short 300 page read, and cover to cover you could probably get through it in a month or two. I really can't recommend this book enough.
