\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}
\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}
\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}
\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}
\def\modd#1 #2{#1\ \mbox{\rm (mod}\ #2\mbox{\rm )}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
	\begin{center}
		\vskip 1cm{\Large\bf 
			Integer Values of Generating Functions for  \\
			\vskip .1in
			a Type of Second-Order Linear Recurrence Sequence
		}
		\vskip 1cm
        \large
Luu Ba Thang and Nguyen Duy Nguyen\\
Department of Mathematics and Informatics \\
Hanoi National University of Education \\
136 Xuan Thuy \\
Cau Giay, Hanoi \\
Vietnam \\
\href{mailto: thanglb@hnue.edu.vn}{\tt thanglb@hnue.edu.vn}\\
\href{mailto: nguyen05hp@gmail.com }{\tt nguyen05hp@gmail.com }
	\end{center}
	
\vskip .2in
\begin{abstract}
Define an integer sequence $(A_n)_{n\geq 0}$ by setting $A_0=a, A_1=b,$ and $A_{n+1}=pA_n+qA_{n-1}$ for all $n$. We consider the case $q=1$ to explore the problem of finding all rational numbers $x$ such that the generating function of $(A_n)$ yields an integer when evaluated at $x$. We point out that we can divide the set of all $x$-values into families and find some families that always exist. Then we provide an algorithm to find all the families through a finite computation. Finally, we apply the algorithm to the special cases that $(a,b)=(0,1)$ and $(a,b)=(1,1)$.
	\end{abstract}
	\section{Introduction}
	Consider a second-order linear recurrence sequence $(A_n)_{n\geq 0}$ defined by \begin{displaymath}\begin{cases}
		A_0=a, A_1=b;\\A_{n+1}=pA_n+qA_{n-1},
	\end{cases}\end{displaymath}where $a,b,p,$ and $q$ are integers and $(a,b)\neq (0,0), p,q\neq 0$.
    
    The generating function of $(A_n)_{n\geq 0}$ is given by \[A(x)=\sum_{n=0}^{\infty}A_nx^n.\]  We see that $A(x)$ is a formal power series in the formal power series domain over the rational field, commonly denoted by $\mathbb Q[[x]].$
	We can calculate that $$A(x)=\frac{a(1-px)+bx}{1-px-qx^2}.$$ Thus
	we can consider $A(x)$ as a rational function of $x$. 
	
	If $(a,b,p,q)=(0,1,1,1)$ or $(a,b,p,q)=(2,1,1,1)$, then $(A_n)_{n\geq 0}$ becomes the well-known Fibonacci sequence $(F_n)_{n\geq 0}$ (\seqnum{A000045}) or the Lucas sequence $(L_n)_{n\geq 0}$ (\seqnum{A000032}). Then the generating functions of 
	$(F_n)_{n\geq 0}$ and $(L_n)_{n\geq 0}$  are, respectively, \[F(x)= \frac{x}{1-x-x^2}\; \text{and}\; L(x)= \frac{2-x}{1-x-x^2}.\] 
	
	Now, for each  second-order linear recurrence sequence $(A_n)_{n\geq 0}$, we set $$\mu(A)=\{x\in\mathbb{Q}\mid A(x)\in\mathbb{Z}\}.$$ 
	
	Finding all elements of $\mu(A)$ is an interesting research problem. When $(A_n)_{n\geq 0}$ becomes the Fibonacci sequence or the Lucas sequence, in $2015$, Hong \cite{1} showed that $$\frac{F_n}{F_{n+1}}\in\mu(F)\cap \mu(L)\; \text{and}\; \frac{L_n}{L_{n+1}}\in\mu(L)$$ for all non-negative integers $n$. He also conjectured whether his results were the only ones that led $F(x)$ and $L(x)$ to integer values. Pongsriiam \cite{2} answered this question in $2017$ by proving that $$\mu(F)=\left\{\frac{F_n}{F_{n+1}}\;\middle|\; n\in\mathbb{N}\cup \{0\} \right\}\cup \left\{-\frac{F_{n+1}}{F_n}\;\middle|\; n\in\mathbb{N} \right\}$$and \begin{displaymath}\begin{aligned}\mu(L)&=\left\{\frac{F_n}{F_{n+1}}\;\middle|\; n\in\mathbb{N}\cup \{0\} \right\}\cup \left\{-\frac{F_{n+1}}{F_n}\;\middle|\; n\in\mathbb{N} \right\}\\&\cup \left\{\frac{L_n}{L_{n+1}}\;\middle|\; n\in\mathbb{N}\cup \{0\} \right\}\cup \left\{-\frac{L_{n+1}}{L_n}\;\middle|\; n\in\mathbb{N}\cup \{0\} \right\}.\end{aligned}\end{displaymath}
	
	At the same time, Bulawa and Lee \cite{3} discovered a result for the sequence $(R_n)_{n\geq 0}$ defined by \begin{displaymath}\begin{cases}
	R_0=0, R_1=1;\\R_{n+1}=pR_n+qR_{n-1},
	\end{cases}\end{displaymath} where $p,q$ are positive integers and $p$ is divisible by $q$. They found all the values of $\mu(R)$ that are in the interval of convergence, where $R(x)$ is the generating function of $(R_n)_{n\geq 0}$. They also extended the results for the Lucas, Pell, and Pell-Lucas sequences.

   
	Another generalization was published by Knapp \cite{4} in $2024$ when he constructed an algorithm to find all elements of $\mu(G)$, where $G(x)$ is the generating function of the Gibonacci sequences $(G_n)_{n\geq 0}: G_0=a, G_1=b, G_{n+1}=G_n+G_{n-1}$. Afterwards, Knapp et al.\ \cite{5} also studied the sequence $(a_n)_{n\geq 0}$ of the form: \begin{displaymath}\begin{cases}
		a_0=0, a_1=1;\\a_{n+1}=pa_n+qa_{n-1}, & \text{if $n\geq 1$,}
	\end{cases}\end{displaymath}
	and indicated the cases of $(p,q)$ in which they could provide a constructive method to find all the elements of $\mu(a)$.
    
	In this article, we study the second-order linear recurrence sequences $(A_n)_{n\geq 0}$ defined by \begin{displaymath}\begin{cases}
			A_0=a, A_1=b; \\A_{n+1}=pA_n+A_{n-1},
	\end{cases}\end{displaymath}where $a,b,p$ are integers and \((a,b)\neq (0,0), p\neq 0\). It turns out that the values $x$ that make the generating function of $(A_n)_{n\geq 0}$ an integer come in families. Moreover, the elements of each family are ratios of consecutive terms of a sequence given in the following theorem:
	\begin{theorem}\label{1}
		Let $A(x)$ be the generating function of $(A_n)_{n\geq 0}$, and $r,s$ be relatively prime integers. Assume that $A(r/s)$ is an integer. Define the sequence $(A^{(r,s)}_n)_{n\in\mathbb{Z}}$ by setting: \begin{displaymath}\begin{cases}
			A^{(r,s)}_0=r, A^{(r,s)}_1=s;\\A^{(r,s)}_{n+1}=pA^{(r,s)}_n+A^{(r,s)}_{n-1}, & \text{if $n>1$;}\\A^{(r,s)}_n=A^{(r,s)}_{n+2}-pA^{(r,s)}_{n+1}, & \text{if $n<0$.}
		\end{cases}\end{displaymath}
		Then
		$A\bigl(A^{(r,s)}_n/A^{(r,s)}_{n+1}\bigr)$ is an integer whenever $A^{(r,s)}_{n+1}\neq 0$.
	\end{theorem}
	From Theorem \ref{1}, we present some families of rational values $x$ that make $A(x)$ an integer.
\begin{theorem}\label{2}
\leavevmode
	\begin{enumerate}
		\item[\rm (i)] $A\bigl(A^{(0,1)}_n/A^{(0,1)}_{n+1}\bigr)$ are integers for all $n\neq -1$, where we define $(A^{(0,1)}_n)$ as in Theorem \ref{1}.
		\item[\rm (ii)] $A\bigl(A^{(-b,a)}_n/A^{(-b,a)}_{n+1}\bigr)$ are integers whenever $A^{(-b,a)}_{n+1}\neq 0$, where $(A^{(-b,a)}_n)$ is defined as in Theorem \ref{1}.
	\end{enumerate}
\end{theorem} 
	The next theorem shows all the values that make $A(x)$ an integer.
	\begin{theorem}\label{3}
		Set $C$ by 
        \begin{displaymath}
        C= \begin{cases}
			\sqrt{(abp^3+(a^2-b^2)p^2)/(p^2+4)}, & \text{if $abp^3+(a^2-b^2)p^2\geq 0$;}\\\sqrt{-abp+b^2-a^2}, & \text{if  $abp^3+(a^2-b^2)p^2<0$,}
		\end{cases}
        \end{displaymath}
		and find all integers $M$ such that $|M|\leq C$ and the equation $$M^2+(p^2+2)MN+N^2=abp^3+(a^2-b^2)p^2$$ has an integer solution $N$. For each value $M$, let $k$ be a nonzero integer solution of the equation \[M^2=(kp-ap+b)^2-4k(a-k).\] For each $k$, set \[x=\frac{ap-kp-b\pm \sqrt{(kp-ap+b)^2-4k(a-k)}}{2k}.\] Then $A(x)$ is an integer, and by Theorem \ref{1}, $x$ generates a family of elements of \(\mu(A)\). All families of $x$ can be found by this way, apart from those given in Theorem \ref{2}. 
	\end{theorem}
	After that, we consider some more typical sequences. The former is the case $(a,b)=(0,1)$, where we give another proof of a special case of Theorem $1.1$ in the paper of Bulawa and Lee \cite{3}, as well as Theorem $1.7$ in the paper of Knapp, Lemos, and Neumann \cite{5}. The latter is the case $(a,b)=(1,1)$, where we provide our corollary. 
\section{Proofs of Theorems \ref{1} to Theorem \ref{3}}
In this section, we consider the sequence $(A_n)_{n\geq 0}$ defined by
\begin{displaymath}\begin{cases}A_0=a, A_1=b;\\A_{n+1}=pA_n+A_{n-1}. \end{cases}\end{displaymath}

The generating function of $(A_n)_{n\geq 0}$ is \[A(x)=\frac{a(1-px)+bx}{1-px-x^2}.\]

\begin{lemma}\label{10}
	Let $r,s$ be integers such that $\gcd(r,s)=1$. Then the value $A(r/s)$ is an integer if and only if 
    
     \[ b\equiv \modd{-ars^{-1}} {|s^2-prs-r^2|}.\]
\end{lemma}
\begin{proof}
		We have $$A(r/s)=\frac{a(1-p\frac{r}{s})+b\frac{r}{s}}{1-p\frac{r}{s}-\frac{r^2}{s^2}}=\frac{as^2-aprs+brs}{s^2-prs-r^2}.$$       
    Then $A(r/s)$ is an integer if and only if 
    \[as^2-aprs+brs-a(s^2-prs-r^2)\equiv \modd{0} {|s^2-prs-r^2|}.\]
        Because $\gcd(r, s^2-prs-r^2)=\gcd(s, s^2-prs-r^2)=1$, this is equivalent to 
        \[ bs+ar\equiv \modd{0} {|s^2-prs-r^2|}\]
        or
        \[ b\equiv \modd{-ars^{-1}} {|s^2-prs-r^2|}.\]
     \end{proof}   
\begin{remark}\label{i}From Lemma \ref{10}, if \(A(r/s)\in\mathbb{Z}\), then we have
	\begin{displaymath}(s^2-prs-r^2)\mid (as^2-aprs+brs). \end{displaymath}
	Because $\gcd(s,s^2-prs-r^2)=1$, this is equivalent to
	\[ (s^2-prs-r^2)\mid (as-apr+br).\]
\end{remark}
\begin{lemma}\label{11}
	Let $r,s$ be integers such that $r,s\neq 0, r+ps\neq 0, \gcd(r,s)=1$ and $A(r/s)$ is an integer. Then
	$A(s/(r+ps))$ 
	and $A((s-pr)/r)$ are integers.
\end{lemma}
\begin{proof}
	We have $$A(s/(r+ps))=\frac{(b-ap)s(r+ps)+a(r+ps)^2}{r^2+prs-s^2}=\frac{(r+ps)(bs+ar)}{r^2+prs-s^2}$$ and
	$$A((s-pr)/r)=\frac{(b-ap)(s-pr)r+ar^2}{r^2+prs-s^2}=\frac{r(bs+ar-aps-bpr+ap^2r)}{r^2+prs-s^2}.$$
    Applying Lemma \ref{10}, we conclude that both $A(s/(r+ps))$ and $A((s-pr)/r)$ are integers.
\end{proof}

\begin{proof}[Proof of Theorem \ref{1}]
	We have that $A\bigl(A^{(r,s)}_0/A^{(r,s)}_1\bigr)=A(r/s)$ is an integer. By Lemma \ref{11} and the induction, we see that $A\bigl(A^{(r,s)}_n/A^{(r,s)}_{n+1}\bigr)$ is an integer whenever $A^{(r,s)}_{n+1}\neq 0$. Note that if there exists $n_0>0$ such that $A^{(r,s)}_{n_0}= 0$, we can still continue the induction from $n_0$ because $A(0)=a$ is an integer. Also, if there  exists \(n_0<0\) such that $A^{(r,s)}_{n_0}= 0$, then \(A\bigl(A^{(r,s)}_{n_0-2}/A^{(r,s)}_{n_0-1}\bigr)=A(-p)\) is an integer. 
\end{proof}
\begin{proof}[Proof of Theorem \ref{2}]
\leavevmode
	\begin{enumerate}
		\item [\rm (i)] We have $$A\bigl(A^{(0,1)}_0/A^{(0,1)}_1\bigr)=A(0)=a\in\mathbb{Z}.$$ Then by Theorem \ref{1}, $A\bigl(A^{(0,1)}_n/A^{(0,1)}_{n+1}\bigr)$ is an integer for all integers $n\neq -1$.
		\item [\rm (ii)] We see that $A\bigl(A^{(-b,a)}_0/A^{(-b,a)}_1\bigr)=A(-b/a)=a$ is an integer. So by Theorem \ref{1}, we imply that \(A\bigl(A^{(-b,a)}_n/A^{(-b,a)}_{n+1}\bigr)\) is an integer whenever $A^{(-b,a)}_{n+1}\neq 0$. 
	\end{enumerate}
\end{proof}
\begin{remark}
\leavevmode
	\begin{enumerate}
		\item[\rm (i)] By induction, we can prove that $$A_n=(-1)^{n-1}A^{(-b,a)}_{1-n}$$ for $n\geq 0$. Then $$\frac{-A_{n+1}}{A_n}=\frac{(-1)^{n+1}A^{(-b,a)}_{-n}}{(-1)^{n-1}A^{(-b,a)}_{-n+1}}=\frac{A^{(-b,a)}_{-n}}{A^{(-b,a)}_{-n+1}}.$$ This implies \(A\bigl(-A_{n+1}/A_n\bigr)\) are integers whenever \(A_n\neq 0\).
		\item[\rm (ii)] From Theorem \ref{1}, if we find out $x_0=r/s$ such that $A(x)$ is an integer, we can construct a family of elements of \(\mu(A)\) including $x_0$.
	\end{enumerate}
\end{remark}
The next part of this section presents an algorithm to find all families of values $x$ for which $A(x)$ is an integer.

Following the approach of Knapp \cite{4}, we assume that $A(x)=k$ is an integer, which is equivalent to \begin{equation}\label{equ4}\frac{a(1-px)+bx}{1-px-x^2}=k.\end{equation} If $k=0$, we can imply that $x=a/(ap-b)$ is in the family generated by the sequence $(A^{(-b,a)}_n)_{n\in\mathbb{Z}}$, which was shown in Theorem \ref{2}. So we can assume $k\neq 0$. Then the equation (\ref{equ4}) is equivalent to
\[kx^2+(kp-ap+b)x+a-k=0.\] Solving for $x$, we see that\[x=\frac{ap-b-kp\pm \sqrt{(kp+b-ap)^2-4k(a-k)}}{2k}.\]
Define $M=\pm\sqrt{(kp+b-ap)^2-4k(a-k)}$ and $x=r/s$, we have $$k=A(r/s)=\frac{as^2-aprs+brs}{s^2-prs-r^2}$$ and
\[M=2kx-ap+kp+b=\frac{br^2+bs^2-apr^2+2ars}{s^2-prs-r^2}.\]
From now on, we write $M$ in the form $M(r,s)$. Note that if there exists an integer $n$ such that $A^{(r,s)}_n=0$, then the family of values $x$ generated by $(A^{(r,s)}_n)$ is identical to the one generated by $(A^{(0,1)}_n)$, which is mentioned in Theorem \ref{2}. So we can assume that the conditions $r\neq 0, s\neq 0, r+ps\neq 0$ automatically hold.
\begin{lemma}\label{12}
	Assume that $r\neq 0, s\neq 0, r+ps\neq 0$. Then
	\begin{enumerate}
		\item[\rm (i)] $M(s-pr,r)+(p^2+2)M(r,s)+M(s,r+ps)=0.$
		\item[\rm (ii)] $M(r,s)^2+(p^2+2)M(r,s)M(s,r+ps)+M(s,r+ps)^2=abp^3+(a^2-b^2)p^2.$
	\end{enumerate}
\end{lemma}
\begin{proof}
\leavevmode
	\begin{enumerate}
		\item[\rm (i)] We have  \begin{displaymath}\begin{aligned}M(s-pr,r)&=\frac{b(s-pr)^2+br^2-ap(s-pr)^2+2ar(s-pr)}{r^2+prs-s^2}\\&=\frac{br^2+bs^2+2ars-2bprs+bp^2r^2-ap^3r^2-aps^2-2apr^2+2ap^2rs}{r^2+prs-s^2}\end{aligned}\end{displaymath}
			\begin{displaymath}
            \begin{aligned}				M(s,r+ps)&=\frac{bs^2+b(r+ps)^2-aps^2+2as(r+ps)}{r^2+prs-s^2}\\&=\frac{bs^2+br^2+2bprs+bp^2s^2-aps^2+2ars+aps^2}{r^2+prs-s^2}			\end{aligned}
            \end{displaymath}
			\begin{displaymath}\begin{aligned}
				(p^2+2)M(r,s)=(p^2+2)\frac{br^2+bs^2-apr^2+2ars}{s^2-prs-r^2}
			\end{aligned}\end{displaymath}
			By addition, we have \[M(s-pr,r)+(p^2+2)M(r,s)+M(s,r+ps)=0.\] 
		\item[\rm (ii)] We have 
        \begin{displaymath}
        \begin{aligned} M(r,s)^2&=\frac{(br^2+bs^2-apr^2+2ars)^2}{(s^2-prs-r^2)^2}\\&=\frac{b^2r^4+b^2s^4+a^2p^2r^4+4a^2r^2s^2+2b^2r^2s^2-2abpr^4+4abr^3s}{(s^2-prs-r^2)^2}\\&+\frac{-2abpr^2s^2+4abrs^3-4a^2pr^3s}{(s^2-prs-r^2)^2};
        \end{aligned}
        \end{displaymath}
        
         \begin{displaymath}
        \begin{aligned}
		M(s,r+ps)^2&=\frac{(bs^2+b(r+ps)^2-aps^2+2as(r+ps))^2}{(s^2-prs-r^2)^2}\\&=\frac{b^2r^4+b^2s^4+6b^2p^2r^2s^2+b^2p^4s^4+a^2p^2s^4+2b^2p^2s^4+4a^2r^2s^2}{(s^2-prs-r^2)^2}\\&+\frac{2b^2r^2s^2+4a^2prs^3+4b^2prs^3+2abps^4+4abrs^3}{(s^2-prs-r^2)^2}\\&+\frac{4abr^3s+4b^2pr^3s+10abpr^2s^2+4b^2p^3rs^3+8abp^2rs^3+2abp^3s^4}{(s^2-prs-r^2)^2};
                \end{aligned}
                \end{displaymath}
         \begin{displaymath}
         \begin{aligned}       
        &(p^2+2)M(r,s)M(s,r+ps)\\&=-\frac{(p^2+2)(br^2+bs^2-apr^2+2ars)(bs^2+b(r+ps)^2-aps^2+2as(r+ps))}{(s^2-prs-r^2)^2}\\&=-\frac{b^2p^2r^4+2a^2p^2r^2s^2+4b^2p^2r^2s^2-abp^3r^4+2b^2r^4+2b^2s^4+8a^2r^2s^2+4b^2r^2s^2}{(s^2-prs-r^2)^2}\\&-\frac{-2abpr^4+3b^2p^2s^4+2abp^3r^2s^2+8abp^2rs^3+8abpr^2s^2+8abrs^3-2abp^4r^3s}{(s^2-prs-r^2)^2}\\&-\frac{4a^2prs^3+4b^2prs^3+b^2p^4s^4-abp^5r^2s^2+2abp^4rs^3+2abps^4+abp^3s^4+2a^2p^3rs^3}{(s^2-prs-r^2)^2}-\\&\frac{2b^2p^3rs^3+8abr^3s-2a^2p^3r^3s+2b^2p^3r^3s-a^2p^4r^2s^2+b^2p^4r^2s^2-4a^2pr^3s+4b^2pr^3s}{(s^2-prs-r^2)^2}.			\end{aligned}
        \end{displaymath}
	Let $T$ be the left-hand side of the needed-proving assertion. By addition, we obtain  
		\[T=\frac{(abp^3+(a^2-b^2)p^2)(s^2-prs-r^2)^2}{(s^2-prs-r^2)^2}=abp^3+(a^2-b^2)p^2.\]
	\end{enumerate}
\end{proof}
\begin{lemma}\label{13}
	Assume that $abp+a^2-b^2<0$ and that there exists a rational value $x$ such that $A(x)$ is an integer. Construct a family of elements of \(\mu(A)\) by Theorem \ref{1}. For each $x$ in the family, calculate the corresponding value $M$. Then, there exists a value $M=M_0$ yielded by some \(x\) in the family such that $|M_0|\leq \sqrt{-abp-a^2+b^2}$.
\end{lemma}
\begin{proof}
	Let $M_0=M(r,s)$ be a value of $M$ such that $|M_0|$ is minimal. Define 
    $$M_1=M(s,r+ps)\; \text{and}\; M_{-1}=M(s-pr,r).$$
	From Lemma \ref{12}, we deduce that both $M_1$ and $M_{-1}$ have opposite signs to $M_0$. Without loss of generality, suppose that $M_0>0$ and $M_1, M_{-1}<0$. Since $|M_0|$ is minimal, we have $M_1,M_{-1}\leq -M_0$. By Lemma \ref{12}, we have $$-M_{-1}-(p^2+2)M_0=M_1\leq -M_0.$$This implies $M_{-1}\geq -(p^2+1)M_0$ or $M_{-1}=tM_0$, where $t\in [-p^2-1,-1]\cap \mathbb{Q}$.
	On the other hand, we see that $$M_{-1}^2+(p^2+2)M_{-1}M_0+M_0^2=abp^3+(a^2-b^2)p^2.$$ This implies\[M_0^2=\frac{abp^3+(a^2-b^2)p^2}{t^2+(p^2+2)t+1}.\]
    Define $f(t)=(abp^3+(a^2-b^2)p^2)/(t^2+(p^2+2)t+1)$ with $t\in [-p^2-1,-1]$. Some calculations give us $$f'(t)=\frac{-(abp^3+(a^2-b^2)p^2)(2t+p^2+2)}{(t^2+(p^2+2)t+1)^2}.$$
	The only root of $f'(t)=0$ (which is the minimum point of $f(t)$) is $t=(-p^2-2)/2$. Since $f(-p^2-1)=f(-1)=-abp+b^2-a^2$, we conclude that $M_0^2\leq -abp+b^2-a^2.$ This implies $$|M_0|\leq \sqrt{-abp+b^2-a^2}.$$
\end{proof}
\begin{lemma}\label{14}
	Assume that $abp+(a^2-b^2)\geq 0$ and there exists a rational value $x$ such that $A(x)$ is an integer. Construct a family of elements of \(\mu(A)\) by Theorem \ref{1}. For each $x$ in the family, calculate the corresponding value $M$. Then there exists a value $M=M_0$ coming from some $x$ in the family such that $|M_0|\leq \sqrt{(abp^3+(a^2-b^2)p^2)/(p^2+4)}$.
\end{lemma}
\begin{proof}
	If \(M_0=0\) then the statement is obvious. So suppose that \(M_0\neq 0\).
    
    If both $M_1$ and $M_{-1}$ have the opposite sign from $M_0$, using the same argument as in Lemma \ref{13}, we imply that $$M_0^2=\frac{abp^3+(a^2-b^2)p^2}{t^2+(p^2+2)t+1},$$ which is impossible since the right-hand side is negative for all \(t\in [-p^2-1,-1]\).
    
	Thus either $M_1$ or $M_{-1}$ has the same sign as $M_0$. Assume that $M_1$ and $M_0$ have the same sign. Then Lemma \ref{12} gives us $$abp^3+(a^2-b^2)p^2=M_0^2+(p^2+2)M_0M_1+M_1^2=|M_0|^2+(p^2+2)|M_0||M_1|+|M_1|^2\geq (p^2+4)|M_0|^2.$$This gives us $$|M_0|^2\leq \frac{abp^3+(a^2-b^2)p^2}{p^2+4}.$$ This implies $$|M_0|\leq \sqrt{\frac{abp^3+(a^2-b^2)p^2}{p^2+4}}.$$
\end{proof}
\begin{proof}[Proof of Theorem \ref{3}]
	From the above theorems, we can construct an algorithm to find all families of values $x$ which make $A(x)$ an integer. First, by Theorem \ref{2}, we know some trivial families which always make $A(x)$ an integer. Then we can find other families by the following steps:
	\begin{enumerate}
		\item[\rm (i)] Find all integer values $M$ such that \begin{displaymath}
        \begin{cases}|M|\leq \sqrt{(abp^3+(a^2-b^2)p^2)/(p^2+4)}, & \;\text{if \; $abp+a^2-b^2\geq 0$;}\\|M|\leq \sqrt{-abp-a^2+b^2}, &\; \text{if \; $abp+a^2-b^2<0$,}\end{cases}
        \end{displaymath} 
        and the equation
		\begin{equation}\label{ii}
			M^2+(p^2+2)MN+N^2=abp^3+(a^2-b^2)p^2
		\end{equation}  has an integer solution $N$.
		\item[\rm (ii)] For each value $M$, use the relation \begin{equation}\label{iii}M^2=(kp+b-ap)^2-4k(a-k)\end{equation} to find the corresponding integer values of $k$.
		\item[\rm (iii)] For each $k\neq 0$, use the relation \begin{equation}\label{iv} x=\frac{ap-kp-b+M}{2k}\end{equation} where \(M=\pm \sqrt{(kp-ap+b)^2-4k(a-k)}\) to find the value $x$.

        For \(k=0\), \(A(x)=0\) leads to \(a(1-px)+bx=0\). Thus, we can find that \(x=a/(ap-b)\), which generates the second family in Theorem \ref{2}.
		\item[\rm (iv)] For each satisfied $x=r/s$, define the sequence $(A^{(r,s)}_n)$ the same as Theorem \ref{1}. Then all the values $A^{(r,s)}_n/A^{(r,s)}_{n+1}$ becomes a family of elements of \(\mu(A)\).
	\end{enumerate}
	By Theorem \ref{1}, we know that the family can be constructed. Also by Lemma \ref{13} and Lemma \ref{14}, we clearly see that all families of elements of \(\mu(A)\) can be found by this way, except the families mentioned in Theorem \ref{2}.  
\end{proof}
\begin{example}
	Given $(a,b,p)=(9,1,2)$, we find all families of $x$. First, we see that Theorem \ref{2} leads to the families \begin{equation}\label{v}
		\ldots,\frac{5}{-2}, \frac{-2}{1}, \frac{0}{1},\frac{1}{2},\frac{2}{5},\ldots
	\end{equation} and \begin{equation}\label{vi}
	\ldots,\frac{-23}{11},\frac{11}{-1},\frac{-1}{9},\frac{9}{17},\frac{17}{43},\ldots.
	\end{equation} To find other families, the equation (\ref{ii}) becomes \[	M^2+6MN+N^2=392,\]
	and we need to find all integers $M$ such that $|M|\leq \sqrt{392/8}=7$ and the above equation has an integer solution $N$. The test gives us $M\in \{-7,-1,1,7\}$. For $M=-7$, the relation (\ref{iii}) becomes \[49=(2k-17)^2-36k+4k^2\]This leads to $k$-values of $3$ and $10$. For $k=3$, by (\ref{iv}) we obtain that $x=2/3$, which leads to the family \begin{equation}
		\ldots,\frac{4}{-1},\frac{-1}{2},\frac{2}{3},\frac{3}{8},\frac{8}{19},\ldots.
	\end{equation} Then $k=10$ implies $x=-1/2$, which is already in the above family. Similarly, the value $M=-1$ leads to $k=9$ and $k=4$. For $k=9$, we have $x=-1/9$, which is already in (\ref{vi}). For $k=4$, we can see that $x=1$ and the satisfied family \begin{equation}
	\ldots,\frac{3}{-1},\frac{-1}{1},\frac{1}{1},\frac{1}{3},\frac{3}{7},\ldots.
	\end{equation}
	For $M=1$, we obtain $k=9$ or $k=4$. The former case leads to $x=0$, which is already in (\ref{v}). The latter leads to $x=5/4$ and the family \begin{equation}
		\ldots,\frac{17}{-6},\frac{-6}{5},\frac{5}{4},\frac{4}{13},\frac{13}{30},\ldots.
	\end{equation} 
	When $M=7$ and $k=10$, it turns out that $x=1/5$, which yields the family \begin{equation}\label{vii}
		\ldots,\frac{-5}{3},\frac{3}{1},\frac{1}{5},\frac{5}{11},\frac{11}{27},\ldots
	\end{equation} 
	and $k=3$ leads to $x=3$, which is already in (\ref{vii}). Thus, we have six families of elements of \(\mu(A)\).
\end{example}
\begin{example}
	Given \((a,b,p)=(1,1,2)\), we can prove that $A_n$ is the $n$-th Pell-Lucas number (\seqnum{A001333}). From Theorem \ref{2}, we have two families already  \begin{equation}\label{xi}
		\ldots,\frac{5}{-2}, \frac{-2}{1}, \frac{0}{1},\frac{1}{2},\frac{2}{5},\ldots
	\end{equation} and \begin{equation}\label{xii}	\ldots,\frac{-7}{3},\frac{3}{-1},\frac{-1}{1},\frac{1}{1},\frac{1}{3},\ldots.
	\end{equation} We can see that $abp^3+(a^2-b^2)p^2=8>0$. Then the equation from Theorem \ref{3} becomes \[M^2+6MN+N^2=8\]and we have to find all $M$ satisfying $|M|\leq 1$ and the above equation has an integer solution $N$. If $M=0$, the relation (\ref{iii}) gives no satisfied value $k$. When $M=1$, the relation leads to $k=0$ or $k=1$. If $k=1$, we find that $x=0$, which leads to the family (\ref{xi}). The case $k=0$ leads to the family (\ref{xii}). When $M=-1$, by the same arguments, we conclude that (\ref{xi}) and (\ref{xii}) are the only satisfied families. 
\end{example}
In the following part, we consider the sequence  $(U_n)_{n\geq 0}$ defined by \begin{displaymath}\begin{cases}U_0=0, U_1=1,\\U_{n+1}=pU_n+U_{n-1}. \end{cases}\end{displaymath} 
Now, by applying Theorem \ref{3}, we explain how our results can obtain a special case of Theorem $1.1$ of
Bulawa and Lee \cite{3} and, also
a special case of Theorem $1.7$ of Knapp et al.\ \cite{5} .
\begin{corollary}[\cite{5}]\label{9}
	Let $U(x)$ be the generating function of $(U_n)_{n\geq 0}$. Then \[\mu(U)=\left\{\frac{A^{(0,1)}_n}{A^{(0,1)}_{n+1}}\;\middle|\; n\neq -1\right\}.\] 
\end{corollary}
\begin{proof}
We can easily see that \((U_n)_{n\geq 0}\) is \((A_n)_{n\geq 0}\) when \((a,b)=(0,1)\). Therefore, applying Theorem \ref{2}, we have \(A^{(0,1)}_n/A^{(0,1)}_{n+1}\in\mu(U)\) for all $n\neq -1$. Applying Theorem \ref{3}, we have \[abp+(a^2-b^2)=-1<0.\] Then we must find $M$ such that $|M|\leq 1$, and the equation $M^2+(p^2+2)MN+N^2=-p^2$ has an integer solution $N$. If $M=0$, we find out $N^2=-p^2$, which is impossible for $p\neq 0$. In case $M=\pm 1$, let $k_0$ and $x_0$ be the values $k$ and $x$ corresponding to $M$.
    
    From the definition of $M$, we have $$(k_0p+1)^2+4k_0^2=1,$$ which has $k_0=0$ be the only integer solution. It means that the family generated by $(A^{(r,s)}_n)$ is identical to the one generated by $(A^{(0,1)}_n)$, which was mentioned by Theorem \ref{2}. They are also all the elements of $\mu(U)$.
\end{proof}
\begin{corollary}[\cite{3}] Let $U(x)$ be the generating function of $(U_n)_{n\geq 0}$. Then 
\leavevmode
	\begin{enumerate}
		\item[\rm (i)] $U(U_n/U_{n+1})$ is an integer for all $n\geq 0$.
		\item[\rm (ii)] Assume that $U(x)=k$ is an integer for some rational number $x$. Then there exists a non-negative integer $n$ such that $U(U_n/U_{n+1})=k$.
	\end{enumerate}
\end{corollary}
\begin{proof}
\leavevmode
	\begin{enumerate}
		\item[\rm (i)] Follows easily from Theorem \ref{2}.
		\item[\rm (ii)] Recall that for \((U_n)_{n\geq 0}\), we have \[U(x)=\frac{x}{1-px-x^2}.\] 
		
		By induction, we can prove that $A^{(0,1)}_{-n}=(-1)^{n+1}A^{(0,1)}_n$ for \(n\in\mathbb{Z}\). Then\begin{displaymath}\begin{aligned}
			U\bigl(A^{(0,1)}_{-n}/A^{(0,1)}_{-n+1}\bigr)&=\frac{A^{(0,1)}_{-n}A^{(0,1)}_{-n+1}}{(A^{(0,1)}_{-n+1})^2-pA^{(0,1)}_{-n+1}A^{(0,1)}_{-n}-(A^{(0,1)}_{-n})^2}\\&=\frac{(-1)A^{(0,1)}_nA^{(0,1)}_{n-1}}{(A^{(0,1)}_{n-1})^2+pA^{(0,1)}_{n-1}A^{(0,1)}_{n}-(A^{(0,1)}_{n})^2}\\&=U\bigl(A^{(0,1)}_{n-1}/A^{(0,1)}_n\bigr).
		\end{aligned}\end{displaymath} By Corollary \ref{9}, $A^{(0,1)}_n/A^{(0,1)}_{n+1}$ are the precise rational values for which \(U(x)\) an integer. Therefore, if \(U(x)=k\) is an integer, we can always find \(n\geq 0\) such that $$U\bigl(A^{(0,1)}_n/A^{(0,1)}_{n+1}\bigr)=U\bigl(U_n/U_{n+1}\bigr)=k.$$ 
	\end{enumerate}
\end{proof}
In the last part, we consider the case \((a,b)=(1,1)\) and prove the following result:
\begin{corollary}\label{co1}
In case \((a,b)=(1,1)\), there are no other families of \(\mu(A)\), apart from those given in Theorem \ref{2}.
\end{corollary}
\begin{proof}
    Since we suppose that \(p\neq 0\) in the beginning of the article, we consider two cases of \(p\): \(p>0\) and \(p<0\).
    
    First case: \(p>0\). Applying Theorem \ref{3}, we need to find \(M\) such that $M^2 < p$ and the equation \begin{equation}\label{equ1} N^2 + (p^2+2)MN + (M^2 - p^3) = 0 \end{equation} has an integer solution \(N\). The discriminant of this equation is $p^2(M^2p^2 + 4p + 4M^2)$. 

        It is clear that \(M^2p^2 + 4p + 4M^2\leq M^2p^2+8p\), so if \(|M|\geq 4\), we have \[(p|M|)^2 < M^2p^2 + 4p + 4M^2 < (p|M| + 1)^2 \]which implies that the discriminant cannot be a perfect square. Therefore, there can only possibly be integer solutions for $N$ if $|M| \le 3$. Note that if \(k=0\), then \(x=1/(p-1)\), which belongs to the second family in Theorem \ref{2}. Thus, in the following part, we suppose that \(k\neq 0\).

        For \(M=0\), from (\ref{iii}) we have \((kp-p+1)^2=4k(1-k) \). Since \(4k(1-k)< 0\) for all integers \(k\neq 0,1\), we only have \(k=1\). This is impossible.

        For \(M=\pm 1\), from (\ref{iii}) we have \((kp-p+1)^2=4k(1-k)+1\). Since \(4k(1-k)+1< 0\) for all integers \(k\neq 0,1\), we have \(k=1\), which leads to \(x=(M-1)/2\) by (\ref{iv}). Since \(M=\pm 1\), we have \(x=0\) (which belongs to the first family in Theorem \ref{2}) or \(x=-1\) (which belongs to the second family in Theorem \ref{2}).

        For \(M=\pm 2\), from (\ref{iii}) we have \((kp-p+1)^2=4k(1-k)+4\). Since \(4k(1-k)+4< 0\) for all integers \(k\neq 0,1\), we have \(k=1\). This is impossible.
        
        For \(M=\pm 3\), from (\ref{iii}) we have \((kp-p+1)^2=4k(1-k)+9\). Since \(4k(1-k)+9< 0\) for all integers \(k\neq -1,0,1,2\), we have \(k\in \{-1,1,2\}\). 
        
        If \(k=-1\), we have \((-2p+1)^2=1\), which implies \(p=1\) (since \(p\neq 0)\)). By (\ref{iv}), we obtain \(x\in\{-2,1\}\). The value \(x=1\) belongs to the first family in Theorem \ref{2}, while \(x=-2\) belongs to the second family in Theorem \ref{2}. 
        
        If \(k=1\), we imply \(1=9\), which is impossible. 
        
        If \(k=2\), we have \(p=0\) or \(p=-2\), which contradicts our case \(p>0\). 
        
   Second case: \(p<0\). Let \(q=-p\), applying Theorem \ref{3}, we need to find \(M\) such that \(M^2\leq q\) and the equation \begin{equation}\label{equ2} N^2+(q^2+2)MN+ M^2+q^3=0 \end{equation} has integer solutions \(N\). 

    Suppose that there exists a value of \(M\) satisfying \(M^2=q\). Then the equation (\ref{equ2}) has an integer solution \(N=-M\). The equation (\ref{iii}) gives us $$q=(q+1-kq)^2-4k(1-k)=(cq+1)^2-4(1-c)c,$$ where \(c=1-k\). This leads to the equation \begin{equation} \label{equ3} c^2q^2+(2c-1)q+(2c-1)^2=0. \end{equation} If \(c=0\), we have \(p=-1, M^2=1,\) and \(k=1\), which leads to \(x=0\) or \(x=-1\) by (\ref{iv}). Both of these values belong to families given in Theorem \ref{2}. If \(c\neq 0\), in (\ref{equ3}) we have \(\Delta_q=(2c-1)^2(1-4c^2)<0\) for all integers \(c\neq 0\), which leads to no solution of \(q\) or \(M\). 
    
   Therefore, all of the other values \(M\) that we need to find satisfy \(M^2<q\) and the equation (\ref{equ2}) has integer solutions \(N\). Then the discriminant of (\ref{equ2}) is \(q^2(M^2q^2+4M^2-4q)\). We can clearly see that if (\ref{equ2}) has integer solutions, \(M^2q^2+4M^2-4q\) must be a perfect square. We prove that \(|M|\leq 1\). Otherwise, suppose that \(|M|\geq 2\). Let \(M^2q^2+4M^2-4q=k^2\) with \(k\geq 0\). Then \((|M|q-k)(|M|q+k)=4(q-M^2)\). Thus, both \(|M|q-k\) and \(|M|q+k\) are even numbers. Set \(|M|q-k=2s\) and \(|M|q+k=2t\). Then 
   $$st=q-M^2\; \text{and}\; s+t=|M|q,$$ which implies \(s(|M|q-s)=q-M^2<q\). Besides, since \(M^2q^2-k^2=4(q-M^2)>0\), we have \(s=(|M|q-k)/2>0\), thus \(s\geq 1\). We also see that \(s=|M|q-t\leq |M|q-1\) since \(t\geq 1\). Therefore, we have \((s-1)(|M|q-s-1)\geq 0\), which implies \(s(|M|q-s)\geq |M|q-1\). So \(|M|q-1<q\). By \(|M|\geq 2\), we have \(2q-1<q\), which is impossible for \(q\geq 1\). 

    For \(|M|\leq 1\), by the same arguments as those in the case \(p>0\), we can prove that there are no other families of \(\mu(A)\), except for those in Theorem \ref{2}. 
\end{proof}
\section{Acknowledgment} The authors would like to thank the referee for many useful suggestions that helped us improve our paper, especially the suggestion for the proof of Corollary \ref{co1}. 

\begin{thebibliography}{9}
\bibitem{3} A. Bulawa and W. K. Lee, Integer values of generating functions for the Fibonacci and
related sequences, \emph{Fibonacci Quart.} \textbf{55} (2017), 74--81.

\bibitem{1} D. S. Hong, When is the generating function of the Fibonacci numbers an integer?,
\emph{College Math. J.} \textbf{46} (2015), 110--112.

\bibitem{4} M. P. Knapp, Fibonacci generating functions, \emph{J. Integer Sequences} \textbf{27} (2024), \href{https://cs.uwaterloo.ca/journals/JIS/VOL27/Knapp/knapp5.html}{Article 24.3.1}.

\bibitem{5} M. P. Knapp, A. Lemos, and V. G. L. Neumann, Integral values of generating functions of recursive sequences, \emph{Discrete Appl. Math.} \textbf{350} (2024), 31--43.  

\bibitem{6} T. Koshy, \emph{Fibonacci and Lucas Numbers with Applications}, Wiley-Interscience, 2001.

\bibitem{2}P. Pongsriiam, Integral values of the generating functions of Fibonacci and Lucas numbers, \emph{College Math. J.} \textbf{48} (2017), 97--101.
		
\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}:
Primary 11B39; Secondary 11B37.

\noindent \emph{Keywords: } Fibonacci number, generating function,  recurrence.

\bigskip
\hrule
\bigskip

\noindent (Concerned with  sequences
\seqnum{A000032},
\seqnum{A000045}, and
\seqnum{A001333}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received  September 22 2025; 
revised versions received  September 23 2025; October 31 2025; November 3 2025; November 25 2025; December 7 2025.
Published in {\it Journal of Integer Sequences}, December 11 2025.

\bigskip
\hrule
\bigskip

\noindent
Return to \href{https://cs.uwaterloo.ca/journals/JIS/}{Journal of Integer Sequences home page}.
\vskip .1in


\end{document}

                                                                                

