# Diophantine equation: $n^2=c(4ab-a-b)-b$?

I asked the following question here, but I did not get a full answer, so I put it here that may be some help.

Let $$n$$ be a positive integer. The Diophantine equation $$n^2=c(4ab-a-b)-b,\qquad (a,b,c\in\mathbb{Z}^+)$$ is solvable for $$n\equiv\pm1\pmod3$$, but I stuck for $$n\equiv0\pmod3$$.

Is there any method to solve it?

thanks!

P.S. The method I used for the cases $$n\equiv\pm1\pmod3$$ is as follows: $$n^2+b=c(4ab-a-b)$$ Assume for a moment the left-hand side is prime. Since $$4ab-a-b>1$$ for all $$a,b>0$$, therefore $$c=1$$. Now let $$n=3k\pm1$$ then $$n^2=9k^2\pm6k+1=3(3k^2\pm2k+1)-2=(4ab-a-b)-b=(4b-1)a-2b$$ If we let $$b=1$$, we have $$a=3k^2\pm2k+1$$.

• The problem looks comparable in difficulty to the Erdos-Straus conjecture en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Straus_conjecture which remains open (as with this problem, one can handle various congruence classes by explicit algebraic solutions, but these do not cover all cases). Jul 17, 2019 at 20:08
• $9k^2=c(4ab-a-b)-b\overset{a\to u+v\\b\to u-v}{\implies}\\ (8 c u - 2 c - 1)^2 - (8 c v - 1)^2 - (2 c + 36 k^2 + 1)^2 + (36 k^2 + 1)^2 = 0 \implies\\(8 c u - 2 c - 1)^2 - (8 c v - 1)^2 - (2 c + 36 k^2 + 1)^2 + (36 k^2 - 1)^2 + (12 k)^2 = 0$ May 13, 2020 at 7:18
• @TerryTao, indeed, this $\ 4\!\cdot\! a\!\cdot\! b - a- b\$ associates immediately with Erdős-Straus. Jan 8, 2021 at 9:02

## 1 Answer

https://math.stackexchange.com/questions/3214034/integer-solutions-to-a-two-sheeted-hyperboloid/3214271#3214271

$$z^2=axy+bx+cy+d$$ Use another equation. $$q=\frac{A^2-d}{b}$$

And we use solutions to the Pell equation. $$k,t -$$ any number.

$$p^2-akts^2=1$$

Decisions then write down so.

$$z=Ap^2-((aq+c)t+bk)ps+aAkts^2$$

$$x=qp^2-2kAps+(k((aq+c)t+bk)-aqkt)s^2$$

$$y=ts(((aq+c)t+bk)s-2Ap)$$