I look for the conditions for $ax^2+ax+1$ to be a perfect square, like some sort of recursive algorithm. I have a fixed $a$ and I would like to express $x$ in terms of $a$ or any other form. (My peculiar case is $52x^2+52x+1$). Any help would be appreciated!
-
It appears that the only solution to the mentioned case is when $x=0,-1$. But I don't think one can generalise the solutions. – Peter Foreman Apr 16 '19 at 23:15
-
What has been tried? What motivates the question ? – Apr 16 '19 at 23:15
-
The solutions to the peculiar case is $x=3,21,234,....$.. Is there a way like Gauss remainder theorem / Aryabhata remainder theorem that can apply for this second order case? – RTn Apr 16 '19 at 23:19
-
https://math.stackexchange.com/questions/2424587/when-is-5n214n1-a-perfect-square/2424845#2424845 – individ Apr 17 '19 at 04:14
3 Answers
Take $v=2x+1,$ your question becomes the Pell type $$ w^2 - av^2 = 4-a $$ This always has solutions using $w=2, v=1,$ which is just $x=0.$
You also need to solve $w^2 - a v^2 = 1,$ which is the original Pell equation. For example, $ \; 649^2 - 52 \cdot 90^2 = 1 $

- 139,541
if $a=4$, $x$ is any integer.
Assume $a \ne 0$,
$ax^2+ax+1 = 1$, solution $x = 0, -1$
$ax^2+ax+1 = 4$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+12}}}-1\right)$
$ax^2+ax+1 = 9$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+32}}}-1\right)$
$ax^2+ax+1 = 16$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+60}}}-1\right)$
$ax^2+ax+1 = 25$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+96}}}-1\right)$
$ax^2+ax+1 = 36$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+140}}}-1\right)$
$ax^2+ax+1 = 49$, solution $x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+192}}}-1\right)$
Any pattern ? 12, 32, 60, 96, 140, 192,...
12 - 0 = 10 + 2
32 - 12 = 20 - 0
60 - 32 = 30 - 2
96 - 60 = 40 - 4
140 - 96 = 50 - 6
192 - 140 = 60 - 8
Seems there is a pattern. $$x = \frac{1}{2}\left(\frac{1}{\sqrt{\frac{a}{a+\sum_{i=1}^{z}(8i+4)}}}-1\right)$$ where, $z \in \mathbb{N}$

- 645
-
Sorry that I cannot provide any theoretical insight. I have an engineering background. – S. Phil Kim Apr 17 '19 at 03:04
You can find many things. Some include:
- $x\equiv 1\bmod 3 \implies a\not\equiv 2 \bmod 3$
- $x\equiv 1,2 \bmod 4 \implies a\equiv 0 \bmod 2$
- $2a+1\equiv z^2 \pmod {x-1}$ or mod any of $x-1$'s factors.
- $x^2+x+1\equiv c^2\pmod{a-1}$ or mod any of $a-1$'s factors.
- etc.
most of this is modular arithmetic 101. Basic case attempts, and quadratic residues. Polynomial remainder theorem thrown in at the end cases. You can continue locking it down mod a-y and x-y.