$n$ is a positive integer. The number of solutions of $x^2+2016y^2=2017^n$ is $k$. Write $k$ with $n$.
Problem
Source: 2016 KMO Senior P1
Tags: number theory
12.11.2016 07:42
2n+2. I'll give a proof later. Also n must be positive integer.
12.11.2016 09:55
Let $f(m)$ denote number of $(x,y)\in \mathbb{Z}^2$ that $x^2+2016y^2=2017^m$ for all $m\in \mathbb{Z}^+_0$, clearly $f(0)=2,f(1)=4$. For $n\in \mathbb{Z}_{\geq 2}$ is an odd integer. We rewrite the equation in $\mathbb{Z}[\sqrt{-2016}]$ as $(x+\sqrt{-2016}y)(x-\sqrt{-2016}y)=2017^n$. If $2017\mid y$, we have $2017\mid x$, so $\Big( \frac{x}{2017}\Big)^2+2016\Big( \frac{y}{2017}\Big)^2=2017^{n-2}$ while $\frac{x}{2017},\frac{y}{2017}\in \mathbb{Z}$ We'll count the number of $(x,y)$ that $2017\nmid y$ Let $\omega =\gcd (x+\sqrt{-2016}y,x-\sqrt{-2016}y)$, we get $\omega \mid 2\sqrt{-2016}y$, so $| \omega | \mid 4\times 2016y^2,2017^n$, so $|\omega |=1$, so $\omega$ is a unit. Note that both unit $1,-1$ can be written as $1=1^n$ and $-1=(-1)^n$. This give us $x+\sqrt{-2016}y=(p+q\sqrt{-2016})^n,x-\sqrt{-2016}y=(p-q\sqrt{-2016})^n\Rightarrow 2017=p^2+2016q^2$ which lead to $4$ possible $(p,q)\in \mathbb{Z}^2$. So $f(n)=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and $n$ is odd. For $n$ is an even positive integer, let $n=2t$ and we'll consider $(x,y)$ that $2017\nmid y$ Since $x^2\equiv_{2017} y^2$, we get $x\equiv_{2017} y,-y$ and note that both case are disjoint since $y\not\equiv_{2017} 0$. For $x\equiv_{2017} y$, let $x=2017k+y$, we get $2017k^2+2ky+y^2=2017^{n-1}=(y+k)^2+2016k^2$ If $2017\mid k$, we get that $2017\mid y+k\Rightarrow 2017\mid y$, contradiction. So $2017\nmid k$ and since $n-1$ is odd number, there are $4$ possible $(a,b)\in \mathbb{Z}^2$ that $2017^{n-1}=a^2+2016b^2$ and $2017\nmid b$. Among these $4$ pairs, there are $2$ pairs that $a\not\equiv_{2017} b$ which come from $a+b\sqrt{-2016}=(1-\sqrt{2016})^{n-1},(-1+\sqrt{2016})^{n-1}$. For $x\equiv_{2017} -y$, let $x=2017k-y$, we get $2017k^2-2ky+y^2=2017^{n-1}=(y-k)^2+2016(-k)^2$. We get similar result with the former case. So $f(n)=f(n-2)+2+2=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and $n$ is even. Finally, we get $f(n)=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and the rest follow by easy induction on $\mathbb{Z}_{\geq 0}$
11.12.2016 00:02
18.03.2017 03:18
Gosh I messed up with this problem. I solve this problem like 10 minutes before the AM test section was over. I wrote as best as I can but failed to right full solution....
27.02.2018 18:26
Here's my solution during the test, much more simplified. (My solution at the contest was a bit trickier, unnecessarily dealing with zeros and signs.) Denote $S_n$ as the solution set $\{(x,y)| x^2 + 2016y^2 = 2017^n, x, y \in \mathbb{Z} \}$. We easily get $|S_1| = 4$ and $|S_2|=6$. We will prove that $|S_n| = 2(n+1)$. Note that for $(x,y) \in S_n$, $(x+2016y,x-y) \in S_{n+1}$ and $(x+2016y,-x+y) \in S_{n+1}$. We will make a bipartite directed graph, with vertices "group" $S_n$ and $S_{n+1}$. We will draw a red edge from $(x,y) \in S_n$ to $(x+2016y,x-y) \in S_{n+1}$. We will draw a blue edge from $(x,y) \in S_n$ to $(x+2016y,-x+y) \in S_{n+1}$. Multiple edges are allowed. Take a $(x,y) \in S_{n+1}$. We will analyze the number of edges in two ways. If $x \equiv y \pmod{2017}$, then $\left(\frac{x+2016y}{2017}, \frac{x-y}{2017} \right) \in S_n$ and there is a red edge between them. If $x \equiv -y \pmod{2017}$, then $\left(\frac{x-2016y}{2017}, \frac{x+y}{2017} \right) \in S_n$ and there is a blue edge between them. Looking at the number of edges from $S_n$, there are a total of $2 |S_n|$ edges. Let's count the number of edges from $S_{n+1}$. If $x, y$ are not a multiple of $2017$, there is exactly one edge coming into $(x,y)$. If $x, y$ are both a multiple of $2017$, there are exactly two edges coming into $(x,y)$. The number of solutions with $x, y$ both a multiple of $2017$ is $|S_{n-1}|$. Therefore, there are, in total $2|S_{n-1}| + |S_{n+1}| - |S_{n-1}| = |S_{n+1}| + |S_{n-1}|$. We now have $2|S_n| = |S_{n+1}| + |S_{n-1}|$, so $|S_n|$ forms an arithmetic sequnce. Therefore, $|S_n|=2n+2$.
28.02.2018 00:21
Thank you all,for beauty solutions!
20.06.2019 20:34
ThE-dArK-lOrD wrote: Let $f(m)$ denote number of $(x,y)\in \mathbb{Z}^2$ that $x^2+2016y^2=2017^m$ for all $m\in \mathbb{Z}^+_0$, clearly $f(0)=2,f(1)=4$. For $n\in \mathbb{Z}_{\geq 2}$ is an odd integer. We rewrite the equation in $\mathbb{Z}[\sqrt{-2016}]$ as $(x+\sqrt{-2016}y)(x-\sqrt{-2016}y)=2017^n$. If $2017\mid y$, we have $2017\mid x$, so $\Big( \frac{x}{2017}\Big)^2+2016\Big( \frac{y}{2017}\Big)^2=2017^{n-2}$ while $\frac{x}{2017},\frac{y}{2017}\in \mathbb{Z}$ We'll count the number of $(x,y)$ that $2017\nmid y$ Let $\omega =\gcd (x+\sqrt{-2016}y,x-\sqrt{-2016}y)$, we get $\omega \mid 2\sqrt{-2016}y$, so $| \omega | \mid 4\times 2016y^2,2017^n$, so $|\omega |=1$, so $\omega$ is a unit. Note that both unit $1,-1$ can be written as $1=1^n$ and $-1=(-1)^n$. This give us $x+\sqrt{-2016}y=(p+q\sqrt{-2016})^n,x-\sqrt{-2016}y=(p-q\sqrt{-2016})^n\Rightarrow 2017=p^2+2016q^2$ which lead to $4$ possible $(p,q)\in \mathbb{Z}^2$. So $f(n)=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and $n$ is odd. For $n$ is an even positive integer, let $n=2t$ and we'll consider $(x,y)$ that $2017\nmid y$ Since $x^2\equiv_{2017} y^2$, we get $x\equiv_{2017} y,-y$ and note that both case are disjoint since $y\not\equiv_{2017} 0$. For $x\equiv_{2017} y$, let $x=2017k+y$, we get $2017k^2+2ky+y^2=2017^{n-1}=(y+k)^2+2016k^2$ If $2017\mid k$, we get that $2017\mid y+k\Rightarrow 2017\mid y$, contradiction. So $2017\nmid k$ and since $n-1$ is odd number, there are $4$ possible $(a,b)\in \mathbb{Z}^2$ that $2017^{n-1}=a^2+2016b^2$ and $2017\nmid b$. Among these $4$ pairs, there are $2$ pairs that $a\not\equiv_{2017} b$ which come from $a+b\sqrt{-2016}=(1-\sqrt{2016})^{n-1},(-1+\sqrt{2016})^{n-1}$. For $x\equiv_{2017} -y$, let $x=2017k-y$, we get $2017k^2-2ky+y^2=2017^{n-1}=(y-k)^2+2016(-k)^2$. We get similar result with the former case. So $f(n)=f(n-2)+2+2=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and $n$ is even. Finally, we get $f(n)=f(n-2)+4$ for all $n\in \mathbb{Z}_{\geq 2}$ and the rest follow by easy induction on $\mathbb{Z}_{\geq 0}$ I don't know whether it's important or not, but do we need to prove that $\mathbb{Z}[\sqrt{-2016}]$ is a UFD. If yes, how to do it?