Prove that for each prime $p>2$ there exists exactly one positive integer $n$, such that $n^2+np$ is a perfect square.
Problem
Source: Polish MO
Tags: number theory
25.02.2017 22:52
n =( (p-1)/2 )^2
26.02.2017 17:15
Let's write the equation as $n(n+p)=k^2$. We can divide into two cases. Case 1: $gcd(n,p)\neq1$ Then let $n=p^mn_1$ $(gcd(p,n_1)=1)$ then $n_1^2 p^m(p^m+1)=k^2$ but $(p^m)^2<p^m(p^m+1)<(p^m+1)^2$, so contradiction. Case 2: $gcd(n,p)=1$ Then $n=a^2, n+p=b^2$ so $b^2-a^2=(b+a)(b-a)=p$ so $b+a=p, b-a=1$. Hence $n=(\frac{p-1}{2})^2$.
10.01.2019 20:42
suppose that $n^2 + np = a^2$. This equation can be written as: $(a-n)(a+n) = np$. Now Let $GCD(n, a) = d$ so that $n = md$ and $a = bd$, with $GCD(m, b) = 1$. Then we will have: $d(b-m)(b+m) = mp$. Since $GCD(m, b) = 1$, $GCD(b-m, m) = GCD(b+m, m) = 1$. This implies that $(b-m)(b+m)|p$. Which will mean that we can create the equations: $b-m = 1$, $b+m = p$ Since $b-m < b+m$ and $b-m$ and $b+m$ are factors of p. Solving these will give us that: $b = \frac{p+1}{2}$ and $m = \frac{p-1}{2}$. from the original equation we get that $d = m$ because $(b-m)(b+m) = p$. Using the values of d and m, we can find that: $n = \frac{(p-1)^2}{4}$ and $a = \frac{(p+1)^2}{4}$ It can be seen that these values work by putting them back into the first equation.
23.12.2020 07:34
Let n^2+np=m^2;This means 4n^2 +4np=4m^2,Which means (2n+p)^2-(2m)^2=p^2 Which factors out to be (2m+2n+p)(2n-2m+p)=p^2 ;The right hand side can only be factored as p*p or p^2*1;The former is rejected since both factors in the factor pair are equal but this is not true since 2m+2n+p>2n-2m+p;Now we have 2n+2m+p=p^2;2n-2m+p=1;Adding both equations we get ;4n+2p=p^2+1,since p is odd as it is a prime greater than two.Hence we can divide by two to still get an integer 2n=(p^2+1)/2-p, A solution only exists if and only if the right hand side is even.Since p is odd ,It follows we should check the parity of (p^2+1)/2; We know all primes are congruent to 1,-1 modulo 4,Hence p^2+1 is congruent to 2 mod 4,Now we have (p^2+1)/2 is congruent to 1 mod 2 or in other words it is odd .Hence n=(p-1)^2/4 Which is an integer and is unique. QED
27.12.2020 21:31
j___d wrote: Prove that for each prime $p>2$ there exists exactly one positive integer $n$, such that $n^2+np$ is a perfect square. $n^2+np=n(n+p)$ Case 1-: if $n=x^2$ then $n+p=y^2$ must also be a perfect square so $p=(y+x)(y-x)$ $y=1+x\implies x=\frac{p-1}{2}$ so $n=x^2=\frac{(p-1)^2}{4}$ in this case Case 2-: if $n=x^2*y$ here $y\neq 1$ and not perfect square then $y|p$ hence so $y=p$ then $n^2+np=x^2*p^2(x^2+1)$ is never a perfect square. Hence only solution is $\boxed{n=\frac{(p-1)^2}{4}}$
14.03.2024 00:19
I claim that $\boxed{n = \left(\frac{p - 1}{2} \right)^2}$ is the only such value of $n$. First observe that $n^2 + np = n(n + p)$, so that if $n(n + p)$ is a square, we must determine precisely whether each factor is a square or if there are some other existing conditions by considering $\gcd(n, n + p) = \gcd(n, p) \in \{1, p\}$. Case 1: $\left(\gcd(n, p) = p \right).$ Then we have that $p \mid n \implies n = pk$, for some $k \in \mathbb{N}$. Hence \[n(n + p) = pk(pk + p) = p^2k(k + 1), \]so that $k(k + 1)$ is a square. However this is a contradiction as $k^2 < k(k + 1) < (k + 1)^2$. $\square$ Case 2: $\left(\gcd(n, p) = 1 \right).$ Then we have that $n = a^2, n + p = b^2$ for some $a, b \in \mathbb{N}$, so that \[p = b^2 - a^2 = (b - a)(b + a) \implies b - a = 1 \text{ and } b + a = p.\]Solving this system yields $a = (p - 1)/2$ and $b = (p + 1)/2$, which in turn yields the solution $n = (p - 1)^2/4$, as desired. $\blacksquare$
14.03.2024 07:04
Let $a^2=n^2+np$, where $a>0$. Then $p^2=(2n+p)^2-(2a)^2=(2n+2a+p)(2n-2a+p)$. Then the only possibility is $2n+2a+p=p^2$, $2n-2a+p=1$. Solving gives $n=\frac{(p-1)^2}{4}$ as the only possibility.
07.05.2024 18:27
$n=\frac{(p-1)^2}{4}$ satisfies. $n^2<n^2+pn<(n+\frac{p+1}{2})^2\implies n^2+np=(n+\frac{p-1}{2}-k)^2$ where $k\geq 1$ since $k=0$ holds. $4(2k+1)n=(p-2k-1)^2\implies 2k+1|p^2$ but $3\leq 2k+1\leq p-2$ gives contradiction as desired.$\blacksquare$
25.06.2024 22:13
Since $n^2+np=n(n+p)=a^2$, we may split into two cases based on $gcd(n,n+p)=gcd(n,p)=1,p$. If the gcd is 1, then $n=m^2, m^2+p=k^2 \implies p=k^2-m^2=(k-m)(k+m) \implies k-m=1, k+m=p \implies m=k-1=p-m-1 \implies m=\frac{p-1}{2}$ so we have $n=(\frac{p-1}{2})^2$. If the gcd is p then $n=pm \implies pm(p(m+1))=p^2m(m+1)=a^2$ which means $m(m+1)=g^2$ but since $m, m+1$ are coprime, we must have $m,m+1$ be perfect squares. However, if $m=t^2$, then we need $t^2+1=h^2 \implies 1=(h-t)(h+t) \implies h-t=h+t=1 \implies h=1, t=0 \implies m=0, n=0$ which is not a positive integer. Thus $n=(\frac{p-1}{2})^2$ is the only positive integer satisfying the conditions.