Find non-zero polynomials $f(n)$ and $g(n)$ with integer coefficients such that $(n^2+3)f(n)^2+1=g(n)^2$.
This problem comes from Pell's equation, which states that for $\forall m\in\mathbb{N}^*$, where $m$ is not a square, there exist positive integer solutions for the equation $x^2-my^2=1$. I was trying to prove this starting with some special cases.
First I deal with a special case where $m=n^2+1$ for an arbitrary positive integer $n$. Then I come up with a quite simple solution. Consider the identity $(2n^2+1)^2-(n^2+1)(2n)^2=1$, which has already been an integer solution where $x=2n^2+1$ and $y=2n$.
Second I deal with the case where $m=n^2+2$. The solution is even much easier with the identity $(n^2+1)^2-(n^2+2)n^2=1$.
However, things become complicated when $m=n^2+3$. Using the same strategy before, it's equivalent to finding non-zero polynomials $\displaystyle f(n)=\sum\limits_{i=0}^ka_in^i$ and $\displaystyle g(n)=\sum\limits_{i=0}^{k+1}b_in^i$ where $k\in\mathbb{N}$ with integer coefficients such that $(n^2+3)f(n)^2+1=g(n)^2$.
My attempt First, let $n=1$. We have $4f(1)^2+1=g(1)^2$, which implies $\displaystyle |2f(1)|<|g(1)|<\max\{|2f(1)+1|,|2f(1)-1|\}$ if $f(1)\neq 0$. Since the coefficients of $f(n)$ and $g(n)$ are all integers, it leads to a contradiction. Therefore, we can conclude that $f(1)=0$ and $g(1)=±1$. Similarly, let $n=-1$, and we have $f(-1)=0$ and $g(-1)=±1$. This implies both $1$ and $-1$ are roots of $f(n)$ and therefore $k\geq 2$. But this doesn't seem to be helpful enough.
Second, I try to deal with cases when $k$ is not large, e.g., $k=2$ or $k=3$.
When $k=2$, \begin{aligned} &(n^2+3)(a_2 n^2+a_1 n+a_0)^2-(b_3 n^3+b_2 n^2+b_1n+b_0)^2+1\\=&n^6(a_2^2-b_3^2)+n^5(2 a_1 a_2-2b_2b_3)+n^4(a_1^2+3a_2^2+2a_0a_2-b_2^2-2b_1b_3) \\+&n^3(2a_0 a_1+6a_2a_1-2(b_1 b_2+b_0b_3))+n^2(a_0^2+6a_2a_0+3a_1^2-b_1^2-2b_0b_2) \\+&n(6 a_0 a_1-2b_0b_1)+3a_0^2-b_0^2+1.\end{aligned} The above calculation result comes from Mathematica. I try to let all coefficients be zero, but I find that there even don't exist REAL numbers $a_0,a_1,a_2,b_0,b_1,b_2,b_3$ such that $\left(n^2+3\right)\left(a_2 n^2+a_1 n+a_0\right)^2-\left(b_3 n^3+b_2 n^2+b_1 n+b_0\right)^2+1\equiv 0$.
When $k=3$, \begin{aligned} & (n^2+3)(a_3n^3+a_2n^2+a_1n+a_0)^2-(b_4n^4+b_3n^3+b_2n^2+b_1n+b_0)^2+1 \\ =& n^8(a_3^2-b_4^2)+n^7(2a_2a_3-2b_3b_4)+n^6(a_2^2+3a_3^2+2a_1a_3-b_3^2-2b_2b_4) \\ +&2n^5(a_1a_2+3a_3a_2+a_0a_3-b_2b_3-b_1b_4) \\+&n^4(a_1^2+6a_3a_1+3a_2^2+2a_0a_2-b_2^2-2b_1b_3-2b_0b_4) \\ +&n^3(6a_1a_2+2a_0(a_1+3a_3)-2(b_1b_2+b_0b_3)) +n^2(a_0^2+6a_2a_0+3a_1^2-b_1^2-2b_0b_2) \\+&n(6a_0a_1-2b_0b_1)+3a_0^2-b_0^2+1. \end{aligned} The result is also that there even don't exist real numbers $a_0,a_1,a_2,a_3,b_0,b_1,b_2,b_3,b_4$ such that $(n^2+3)(a_3n^3+a_2n^2+a_1n+a_0)^2-(b_4n^4+b_3n^3+b_2n^2+b_1n+b_0)^2+1\equiv 0$.
Therefore, I guess there're no REAL coefficients to form the identity $(n^2+3)f(n)^2+1=g(n)^2$ when $k\geq 2$. I don't know whether my guessing is correct or not.
By the way, I believe that I've successfully proved when $k$ is even, we cannot find such $a_k,a_{k-1},\cdots,a_0,b_{k+1},\cdots,b_0\in\mathbb{R}$. This is because when $k$ is even, $k+1$ is odd. We can rewrite $(n^2+3)f(n)^2+1=g(n)^2$ as $$(n^2+3)\bigg(\sum\limits_{i=0}^ka_in^i\bigg)^2+0.5=\bigg(\sum\limits_{i=0}^{k+1}b_in^i\bigg)^2-0.5.$$ Obviously, the left hand side is forever positive if $n$ only takes real values, which implies $LHS=0$ does not have real solutions. On the other hand, since $k+1$ is odd, the right hand side$\displaystyle \sum\limits_{i=0}^{k+1}b_in^i=\sqrt{0.5}$ always has real number solutions, which implies $RHS=0$ has real solutions. This leads to a contradiction.
However, I cannot get any further when $k$ is odd. Any help will be appreciated.