Good algebraic number theory books 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^2-Dy^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.
 A: 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 GTM-books 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. 
A: 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.
In addition, Gauss's book, being a little old and hard, is a good reference on quadratic forms and it itself offers two different kinds of proofs of the quadratic reciprocity law which are all excellent to me.
The last but not the least, I would like to confirm once more the book by Jurgen Neukirch which notes the connection between ideals and lattices, i.e. algebraic numbers and geometry.
A: 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 =)
A: 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.
A: 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.
A: Serge Lang's Algebraic Number Theory has a lot of general theoretical material.
A: 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.
A: I know of very few more endearing books on the subject than Ireland and Rosen's A Classical Introduction to Modern Number Theory.
A: 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.
A: 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.
A: The book Number theory II by Koch (translated by Parshin and Shafarevich) is very good, and contains some hard-to-find 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!)
A: Marcus's Number Fields is a good intro book, but it's not in LaTeX, so it looks ugly. Also doesn't do any local (p-adic) theory, so you should pair it with Gouvêa's excellent intro p-adic book and you have a great first course in algebraic number theory.
Update: a typeset version of Marcus was published in 2018 and a third edition of Gouvêa was published in 2020.
A: 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.
A: 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.
A: 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?)
A: See Nancy Childress 'Class field theory' (DOI link). Best book.
A: A recent gem is John Stillwell's Algebraic Number Theory for Beginners: A Path from Euclid to Noether (link to publisher's page). It is particularly gentle, even going over the necessary parts of linear algebra. It also does a great job of putting the subject in a historical perspective, as one would expect from Stillwell. Delightful in its own right and a stepping stone to more advanced texts.
