How many integer pairs satisfy the ellipse $x^2+ay^2=r?$
Solution 1:
This isn't an answer so much as it is "moving the question." Let $\phi_a(n)$ be the number of integer solutions to $x^2+ay^2=n$.
Claim
$$\sum_{n=0}^\infty{\phi_a(n)}q^n = \theta_3(q)\theta_3(q^a)$$ This fact is cool but doesn't really get us much closer to knowing what $\phi_a(n)$ is... To prove this claim we will need to
1) Know the definitions of these theta functions. We will use
$$\theta_3(q) = \sum_{k = -\infty}^\infty{q^{k^2}}$$
2) Acknowledge that an absolutely convergent series will give the same result regardless of how it is traversed. For this proof we will traverse an infinite sum elliptically (How appropriate!).
Proof
So we have to write out the product of two double infinite series. This can be imagined as an infinite array. I will index this array with the Guassian integers.
$$ \theta_3(q)\theta_3(q^a) = \sum_{x+yi\in \mathbb{Z}[i]}{q^{x^2+ay^2}} $$ But now we rearrange the sum so that we can "traverse" it. We need to make sure every point in this array is accounted for. We will then start at the center of the array and head outward.
$$\sum_{x+yi\in \mathbb{Z}[i]}{q^{x^2+ay^2}}=\sum_{n=0}^\infty\sum_{x^2+ay^2=n} q^{x^2+ay^2}=\sum_{n=0}^\infty\sum_{x^2+ay^2=n} q^{n}= \sum_{n=0}^\infty \phi_a(n)q^{n}$$
The first equality holds because each Guassian integer lies on some ellipse $x^2+ay^2=r$. The second equality is substitution. The third equality follows from the definition $\phi_a(n)$.
$\square$
Great! So what's $\phi_a(n)$? It seems like it might be tricky without a given $a$.
One more comment. By considering the area inside of the curve $x^2+ay^2=R^2$ we arrive at:
Comment $$ \lim_{R\to\infty} R^{-2} \sum_{n=0}^{R^2} \phi_a(n) = \frac{\sqrt{a}}{a}\pi $$
Generalize To generalize the argument above. I haven't verified the claim below I am just leaving myself bread crumbs to follow up on.
Given $\bar{a}= (a_1 \dots a_m)$ we let $\phi_{\bar{a}}(n)$ denote the total number of integer solutions of $\sum{a_i x_i^2}=n$. Then $\sum\phi_{\bar{a}}(n)q^n=\prod{\theta_3{(q^{a_i})}}$.