Reference request: Binary quadratic forms I am currently a first year grad student doing an independent study on topics in algebraic number theory and am currently looking at some of the properties of the polynomial $n^2 + n + A$, where $A \in \{2,3, 5, 11, 17,41\}$ a.k.a. $A$ is one of Euler's lucky numbers. I am currently studying the ring $\mathbb{Z}[\eta]$ where $\eta = \frac{-1 + \sqrt{1 - 4A}}{2}$. The norm of $x + y \eta \in \mathbb{Z}[\eta]$ is defined to be $$\mathcal{N}(x + y \eta) : = (x + y \eta)(x - y \eta) = x^2 - xy + Ay^2$$ and I just worked through a lemma that stated ''if $\pi$ is an element on $\mathbb{Z}[\eta]$ whose norm is a rational prime $p$, then $\pi$ is prime in $\mathbb{Z}[\eta]$." My main question is which primes are represented by the binary quadratic form $f(x,y) = x^2 - xy +Ay^2$. Does anyone know of a text that addresses such questions? I have a copy of Gauss' Disquisitiones Arithmeticae but would prefer a more modern text. 
 A: I like Buell. Much of what you would want is also in Dickson's Intro, about 1929. Plus, to be realistic, my answers here, as i generally use the quadratic form methodology.
For your question the answer is all primes such that $(\Delta|p) = 1,$ with $\Delta = 1 - 4 k.$ Also $k$ itself, when that is $2.$ The overall theme is that any such prime is represented by a form of discriminant $\Delta.$ When the class number is one, that means the principal form itself.
In these cases $4k-1= q$ is also prime. Quadratic reciprocity gives us, for odd primes $p,$
$$ (-q|p) = (p|q). $$
Proof is two cases, since $q \equiv 3 \pmod 4,$ separate $p \equiv 1 \pmod 4$ and $p \equiv 1 \pmod 4$
Is the notorious $n^2 + n + 41$ prime generator the last of its type?
http://math.blogoverflow.com/2014/08/23/binary-quadratic-forms-over-the-rational-integers-and-class-numbers-of-quadratic-%EF%AC%81elds/
A: The reason Euler's numbers are "lucky" is that the corresponding discriminant $D=1-4A$ has class number $1$.
In the language of quadratic forms, this means that, up to equivalence, there is a unique binary quadratic form of discriminant $D$ - i.e. $f(x,y) =x^2-xy+Ay^2$. This is the approach taken by @WillJagy in his answer.
In the language of number fields, this means that the ring $\mathbb Z[\eta]$ is a principal ideal domain. A rational prime $p$ is represented by $f$ if and only if there is some principal prime ideal $\mathfrak p\subset\mathbb Z[\eta]$ with norm $p$. When $\mathbb Z[\eta]$ is a PID, every ideal is principal, and we deduce
$$f\text{ represents }p\iff \text{the ideal }p\mathbb Z[\eta]\text{ splits as }\mathfrak p_1\mathfrak p_2\text{ in }\mathbb Z[\eta].$$
This occurs if and only if the polynomial $g(x) =x^2-x+A$ is reducible modulo $p$ and, via quadratic reciprocity, this gives the same answer as before.
An excellent introduction to this is David Cox's book Primes of the form $x^2+ny^2$. Cox begins in the language of quadratic forms, before weaving together the two approaches at the beginning of the second section. He then attempts to answer the same question when $A$ is not "lucky" using Class Field theory.
