Let $n\ge 2$ be an integer. Determine the number of positive integers $m$ such that $m\le n$ and $m^2+1$ is divisible by $n$.
Problem
Source: MEMO 2015, problem T-8
Tags: number theory, divisor, C.R.T
29.08.2015 00:08
29.08.2016 08:42
Number of solutions of $m^2 + 1 \equiv 0 \pmod{n}$ in modulo $n$. yay If $4|n$ or $p|n$ with $p=4k+3$, the answer is clearly $0$. If not, the answer is $2^{\text{number of odd primes of n}}$. First, let us take care of $2|n$. It just determines whether or not $m$ is even or not. So we are left with $p^e$ where $p=4k+1$. Let us solve $m^2 \equiv -1 \pmod{p^e}$. CRT will do the rest. If $m^2 \equiv n^2 \pmod{p^e}$ and $(m,p)=1$, we have $m \equiv \pm n \pmod{p^e}$. So the equation has either $0$ or $2$ solutions. But it is easy to see that there are two solutions by Hensel. Done.
29.08.2016 08:46
What is Hensel's lemma ?
30.08.2016 17:25
kk108 wrote: What is Hensel's lemma ? Don't hesitate to use that new thing called The Internet..
31.08.2016 06:57
Tintarn wrote: kk108 wrote: What is Hensel's lemma ? Don't hesitate to use that new thing called The Internet.. Thank you !
11.02.2017 20:03
fractals wrote:
You don't need Hensel's Lemma here. You can prove this using elementary methods. You want to prove that if $p\equiv 1\pmod{4}$ is prime, then there are exactly two solutions to $x^2 + 1 \equiv 0 \pmod{p^k}$. There is at least one solution because $x^2+1\equiv 0\pmod{p}$ is solvable by Quadratic Reciprocity and by the proof in the website below (if $p\equiv 1\pmod{4}$, then $p$ is an odd prime, and clearly $p\nmid -1$). https://en.wikipedia.org/wiki/Quadratic_reciprocity#.C2.B11_and_the_first_supplement http://math.stackexchange.com/questions/1429863/prove-that-quadratic-residual-mod-p-rightarrow-quadratic-residual-mod-pn/1430792#1430792 If $a$ is a solution to $x^2+1\equiv 0\pmod{p^k}$, then $-a$ is also a solution, and $a\not\equiv -a\pmod{p^k}$, because otherwise $p^k\mid 2a$, which is impossible, because $p$ is odd and $\gcd(p,a)=1$ because $\gcd(p,-1)=1$. $x_1^2+1\equiv x_2^2+1\pmod{p}$ if and only if $p\mid x_1^2-x_2^2=(x_1+x_2)(x_1-x_2)$ if and only if $x_1\equiv \pm x_2\pmod{p}$ by Euclid's lemma, which means there can't be another third solution. Done.
11.01.2022 16:28
$p|n$ $p|m^2+1$ $p=4k+1$ or $p=2$ $t$ is number of odd primes of $n$ by C.R.T answer: $2^t$