I have just finished a master's degree in Mathematics and want to learn everything possible about algebraic number fields and especially applications to the generalized Pell equation (my thesis topic), $x^2Dy^2=k$, where $D$ is square free and $k \in \mathbb{Z}$. I have a solid foundation in Modern Algebra and Elementary number theory as well as Analysis. Does anyone have any suggestions? I am currently reading Harvey Cohn's 'Advanced Number Theory' with slow but marked progress. Thanks.

Though Mariano's comment above is no doubt true and the most complete answer you'll get, there are a couple of texts that stand apart in my mind from the slew of textbooks with the generic title "Algebraic Number Theory" that might tempt you. The first leaves off a lot of algebraic number theory, but what it does, it does incredibly clearly (and it's cheap!). It's "Number Theory I: Fermat's Dream", a translation of a Japanese text by Kazuya Kato. The second is Cox's "Primes of the form $x^2+ny^2$, which in terms of getting to some of the most amazing and deepest parts of algebraic number theory with as few prerequisites as possible, has got to be the best choice. For something a little more encyclopedic after you're done with those (if it's possible to be "done" with Cox's book), my personal favorite more comprehensive reference is Neukirch's Algebraic Number Theory. 


I know of very few more endearing books on the subject than Ireland and Rosen's A Classical Introduction to Modern Number Theory. 


Marcus's Number Fields is a good intro book, but its not in Latex, so it looks ugly. Also doesn't do any local (padic) theory, so you should pair it with Gouvea's excellent intro padic book and you have great first course is algebraic number theory. 


Many people have recommended Neukirch's book. I think a good complement to it is Janusz's Algebraic Number Fields. They cover roughly the same material. Neukirch's presentation is probably the slickest possible; Janusz's is the most hands on. I love them both now, but I found Janusz understandable at a point when Neukirch was still completely impenetrable. Neither of these is particularly strong on the Pell equation, though. 


It might be at too basic/introductory a level for your purposes, but as an undergraduate I really liked Stewart and Tall's Algebraic Number Theory (2nd edition?) 


I would recommend you take a look at William Stein's free online algebraic number theory textbook. It is especially useful if you want to learn how to compute with number fields, but it is still extremely readable even if you skip the details of the computational examples. 


Look at: Map of Number Theory The book recommended there (Manin/Panchishkin's "Introduction to Modern Number Theory") does seem amazingly comprehensive, and very readable. 


I could be wrong, but I think Borevich and Shafarevich cover material related to Pell's equation. If not, then it is still an excellent book on algebraic number theory as is Serre's "A Course in Arithmetic". However Serre does not discuss Pell's equation. (I also found Cohn difficult to read =) 


In particular, in view of the focus of your studies, I suggest the following additional book; where additional is meant that I would not suggest it as the only book (see below for explanation). There is a fairly recent book (in two volumes) by Henri Cohen entitled "Number Theory" (Graduate Texts in Mathematics, Volumes 239 and 240, Springer). [To avoid any risk of confusion: these are not the two GTMbooks by the same author on computational number theory.] It contains material related to Diophantine equations and the tools used to study them, in particular, but not only, those from Algebraic Number Theory. Yet, this is not really an introduction to Algebraic Number Theory; while the book contains a chapter Basic Algebraic Number Theory, covering the 'standard results', it does not contain all proofs and the author explictly refers to other books (including several of those already mentioned). However, I could imagine that a rich exposition of how the theory you are learning can be applied to various Diophantine problems could be valuable. Final note: the book is in two volumes, the second one is mainlyon analytic tools, linear forms in logarithms and modular forms applied to Diophantine equations; for the present context (or at least initially), the first volume is the relevant one. 


If you want to have a pretty solid foundation of this subject, then you are suggested to read the book Lectures on Algebraic Number Theory by Hecke which is extremely excellent in the discussion of topics even important nowadays, or the report of number theory by Hilbert whose foundation is indeed solid. 


Serge Lang's Algebraic Number Theory has a lot of general theoretical material. 


See Solving the Pell Equation (reviewed here). You probably know Lenstra Jr.'s article in the AMS Notices. There's also Primes of the form $x^2 + ny^2$ by Cox. 


If you want to learn class field theory (which you should at some point, after you have read an introductory book on algebraic number theory), then "Algebraic Number Theory" edited by Cassels and Fröhlich is a classic that doesn't get old. It has been recently reprinted by the LMS. 


The book Number theory II by Koch (translated by Parshin and Shafarevich) is very good, and contains some hardtofind material. For example, they give a presentation of the absolute Galois group of a local field. Also (I can't imagine someone else hasn't suggested this) the conference proceedings Algebraic number theory, edited by Cassels and Fröhlich, is a pretty standard text with lots of useful stuff (including Tate's thesis!) 


I am amazed not to see the book "Introductory Algebraic Number Theory," by Alaca & Williams, listed here. I find it to be one of the most clear math books on an advanced topic, ever. 

