<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}
\usepackage{mathtools}

\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}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}

\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}

\newcommand{\Z}{\mathbb{Z}}


\begin{center}
\vskip 1cm{\LARGE\bf Fibonacci Generating Functions
}
\vskip 1cm
\large
Michael P.\ Knapp\\
Department of Mathematics and Statistics\\
Loyola University Maryland\\
4501 North Charles Street\\
Baltimore, MD 21210 \\
USA\\
\href{mailto:mpknapp@loyola.edu}{\tt mpknapp@loyola.edu} \\
\end{center}

\vskip .2 in
\begin{abstract}
Define an integer sequence $(G_n)_{n \in \mathbb{Z}}$ by setting $G_0 = a$, $G_1 = b$, and $G_n = G_{n-1} + G_{n-2}$ for all $n$.  In this paper, we explore the problem of finding all rational numbers $x$ such that the generating function of the sequence yields an integer when evaluated at $x$.  We show that these numbers can be naturally divided into families and find some families that are always present.  Then we give an algorithm that, for each choice of $a$ and $b$, reduces the problem of finding all of the families to a finite computation.
\end{abstract}









\section{Introduction}
\label{secintro}
In a 2015 article \cite{hong} in the \textit{College Mathematics Journal}, Hong studied the generating functions for the Fibonacci (\seqnum{A000045}) and Lucas (\seqnum{A000032}) numbers.  For each sequence, Hong found a set of rational values of $x$ such that the generating function evaluated at $x$ is an integer, and asked whether more such values existed.  This question was answered in 2017 by Pongsriiam \cite{pong}, who found additional values of $x$ which worked, and gave a proof that he had found all such values.  Around the same time Bulawa \&amp; Lee \cite{bul-lee} proved that for the Fibonacci sequence, if one only considers values inside the interval of convergence of the generating function, then Hong had found all the values of $x$ such that the generating function is an integer.  Moreover, they extended this work to more general sequences.  If $(a_n)_{n \geq 0}$ is a sequence with $a_0 = 0$ and $a_1 = 1$ that satisfies a recurrence of the form $a_n = Ma_{n-1} + Na_{n-2}$, where $M, N$ are positive integers with $N | M$, then Bulawa \&amp; Lee found all values of $x$ in the interval of convergence of the generating function which make the generating function an integer.

In this article, we prove similar results for every sequence satisfying the Fibonacci recurrence.  For integers $a, b$, we define the Fibonacci-like sequence $G^{(a,b)}_n$ by
\[ \begin{array}{llll}
G^{(a,b)}_0 = a, &amp; G^{(a,b)}_1=b, &amp; \mbox{and} &amp; \mbox{$G^{(a,b)}_n = G^{(a,b)}_{n-1} + G^{(a,b)}_{n-2}$ for $n \geq 2$.}
\end{array}  \]
For example, the $G_n^{(3,1)}$ sequence (\seqnum{A104449}) begins
\[  3, 1, 4, 5, 9, 14, 23, 37, 60, 97, 157, 254, 411, \ldots.  \]
Setting $(a,b) = (0,1)$ gives the Fibonacci sequence $F_n$, and setting $(a,b) = (2,1)$ gives the Lucas sequence.  Note that we can extend these sequences to negative indices by using the recurrence relation.  For example, the relation says that we should have $G_1^{(3,1)}  =  G_0^{(3,1)} + G_{-1}^{(3,1)}$, and so we obtain $G_{-1}^{(3,1)} = -2$.  This generalization of the Fibonacci sequence has been studied by many authors over a long period of time.  See \cite{tag, hor, koshy, petho, eng-bic} for some examples of work done with these sequences.  These are only examples, as a search for ``generalized Fibonacci'' on MathSciNet yields almost 2,000 results.

For each of these sequences, our goal is to find all the rational $x$-values which make its generating function an integer.  We will show how to find all of these $x$-values for each possible pair $(a, b)$.  It turns out that these $x$-values come in families, where the elements of each family are ratios of consecutive terms of a sequence satisfying the Fibonacci recurrence.  We show this in our first theorem.

\begin{theorem}
\label{thm1}
Let $(a,b) \in \Z^2$, define the sequence $G^{(a,b)}_n$ as above and let $G^{(a,b)}(x)$ be the generating function for this sequence.  Suppose that $G^{(a,b)}(p/q)$ is an integer, where $p$ and $q$ are relatively prime integers.  If $p+q \neq 0$, then $G^{(a,b)}(q/(p+q))$ is an integer.  Also, if $p \neq 0$, then $G^{(a,b)}((q-p)/p)$ is an integer.
\end{theorem}

After proving Theorem \ref{thm1}, we prove a corollary which, for each $(a,b)$, gives two families of rational $x$-values such that $G^{(a,b)}(x)$ is an integer.  This corollary generalizes some of Pongsriiam's results \cite{pong}.

\begin{corollary}
\label{cor1}
Let $(a,b) \in \Z^2$ and define $G^{(a,b)}_n$ and $G^{(a,b)}(x)$ as above.  The values $F_n/F_{n+1}$ produce integer values of $G^{(a,b)}(x)$ for all integers $n \neq -1$, and the values $x = -G^{(a,b)}_{n+1}/G^{(a,b)}_n$ produce integer values of $G^{(a,b)}(x)$ whenever $G^{(a,b)}_n \neq 0$.
\end{corollary}

As we will see in Lemmas  \ref{afam} and \ref{afamvalues}, we can also describe the second family as ratios of consecutive terms of a sequence $H_n$ satisfying the Fibonacci recurrence, where $H_0 = -b$ and $H_1 = a$.  To make our results somewhat easier to state, we will say that a number $x$ is \textit{good for $(a,b)$} if $x$ is rational and $G^{(a,b)}(x)$ is an integer.  For example, the first part of Corollary \ref{cor1} says that the ratio $F_n / F_{n+1}$ is good for all $(a,b)$ whenever $n \neq -1$.  If the pair $(a, b)$ is clear from context, then we will just say that the number $x$ is \textit{good}.

Our next theorem is a partial converse of Theorem \ref{thm1}, in which we start with a given sequence $H_n$.

\begin{theorem}
\label{thm2}
Suppose that $p$ and $q$ are integers with $\gcd(p,q)=1$, and let $H_n$ be the sequence with $H_0=p$, $H_1=q$, and $H_n = H_{n-1} + H_{n-2}$ for all integers $n$.  Then there exist infinitely many pairs $(a,b)$ such that all the values $x = H_n / H_{n+1}$ (with $H_{n+1} \neq 0$) are good for $(a,b)$.  Specifically, these ratios are good for $(a,b)$ if and only if
\[  a \equiv -bp(q-p)^{-1} \equiv -bqp^{-1} \pmod{|q^2 - pq - p^2|}.  \]
\end{theorem}

In this theorem, if $|q^2 -pq -p^2|=1$, then we interpret congruence modulo 1 as being the trivial ring, and so the congruence condition is always satisfied.  This occurs when $H_n$ is the sequence of Fibonacci numbers, possibly multiplied by $-1$ and possibly with shifted indices (for example, when $H_n = F_{n+3}$).  In particular, this interpretation gives meaning to the theorem when either $p$ or $q-p$ equals 0.

Finally, given the pair $(a,b)$, we show how to find all $x$-values that are good for $(a,b)$.  We will prove the following theorem.

\begin{theorem}
\label{thm3}
Let $(a,b) \in \Z^2$ with $(a,b) \neq (0,0)$, and define $G^{(a,b)}(x)$ as above.  Set 
\begin{displaymath}
C = \begin{cases}
\sqrt{|a^2 + ab - b^2|},  &amp;  \text{if $a^2 + ab - b^2 &lt; 0$;}\\
\sqrt{\frac{1}{5}(a^2 + ab - b^2)},  &amp;   \text{if $a^2 + ab - b^2 &gt; 0$,}
\end{cases}
\end{displaymath}
and find all integers $M$ with $|M| \leq C$ such that the equation $M^2 + 3MN + N^2 = a^2 + ab - b^2$ has an integer solution $N$.  For each of these $M$-values, let $k$ be a nonzero integral solution of the equation $M^2 = 5k^2 + (2b-6a)k + (a-b)^2$, and set $x = (a-b-k+M)/2k$.  Then $x$ is good for $(a,b)$ and generates a family of good values.  All families of good values for $(a,b)$ can be found in this way, except possibly the one corresponding to the Fibonacci sequence and the one containing the solution of $G^{(a,b)}(x) = 0$.
\end{theorem}

The remainder of this article is divided into three sections.  In the next section, we will give the relatively simple proofs of Theorem \ref{thm1}, Corollary \ref{cor1}, and Theorem \ref{thm2}.  In Section \ref{secgoodvals}, we prove Theorem \ref{thm3} and give some examples of using the method to find all the good values for some specific choices of $(a, b)$.  The final section acknowledges the contributions of colleagues with whom the author had some valuable conversations.










\section{Families of good $x$-values}
\label{secfamilies}

In this section, we prove Theorem \ref{thm1}, Corollary \ref{cor1}, and Theorem \ref{thm2}.  For a pair $(a,b)$, define the sequence $G^{(a,b)}_n$ as in the introduction.  Since this notation is somewhat awkward, we will drop the superscript from all of our notation unless we need the superscript to ensure clarity.  Thus we will write $G_0 = a$, $G_1 = b$, etc., and the generating function for this sequence will be written as $G(x)$.

As a trivial case, if $a=b=0$, then $G_n = 0$ for all $n$, and $G(x)$ is identically zero.  Clearly, every rational number is good, and then Theorem \ref{thm1}, Corollary \ref{cor1}, and the congruence in Theorem \ref{thm2} are trivially true.  For the rest of this article, we will assume that $(a,b) \neq (0,0)$.

We begin by finding a formula for $G(x)$.

\begin{lemma}
The generating function for the sequence $G_n$ is
\begin{equation}
\label{genfn}
G(x) = \frac{(b-a)x + a}{1 - x - x^2}.
\end{equation}
\end{lemma}

\begin{proof}
The generating function for our sequence is
\[  G(x) = G_0 + G_1 x + G_2 x^2 + G_3 x^3 + G_4 x^4 + \cdots.  \]
This immediately yields
\[  xG(x) = G_0 x + G_1 x^2 + G_2 x^3 + G_3 x^4 + \cdots  \]
and
\[  x^2 G(x) = G_0 x^2 + G_1 x^3 + G_2x^4 + \cdots.  \]
We can then see that
\begin{align*}
\MoveEqLeft G(x) - xG(x) - x^2G(x) \\
 &amp;  =  G_0 + (G_1 - G_0)x + (G_2 - G_1 - G_0)x^2 + (G_3 - G_2 - G_1)x^3 + \cdots\\
  &amp; = a + (b-a)x.
\end{align*}
Note that the recursion relation for the sequence ensures that the coefficients of $x^2, x^3, \ldots$ are all zero.  The formula for $G(x)$ now follows.
\end{proof}


Now that we have a formula for $G(x)$, we prove a lemma about when a rational number $p/q$ is good for $(a,b)$.  This allows us to avoid repeating the same argument several times in the proofs below.

\begin{lemma}
\label{whengood}
Suppose that $(a,b) \neq (0,0)$, and suppose that $p$ and $q$ are relatively prime integers.  Then $x=p/q$ is good for $(a,b)$ if and only if we have
\[  a \equiv -bp(q-p)^{-1} \equiv -bqp^{-1} \pmod{|q^2 - pq - p^2|}.  \]
\end{lemma}
\begin{proof}
Since $\gcd(p,q) = 1$, it is easy to check that $\gcd(q-p, q^2 - pq - p^2) = \gcd(p, q^2 - pq - p^2) = 1$, and so both inverses exist.  Moreover, since $p^2 \equiv q(q - p)$  (mod $|q^2 - pq - p^2|$), we always have $-bp(q-p)^{-1} \equiv -bqp^{-1}$ (mod $|q^2 - pq - p^2|$).

Now, we have
\begin{equation}
\label{simp}
G(p/q)  =  \frac{(b-a)\Big(\frac{p}{q}\Big) + a}{1 - \frac{p}{q} - \frac{p^2}{q^2}}  =  \frac{q\bigl( (b-a)p + aq\bigr)}{q^2 - pq - p^2}.
\end{equation}
Since the numerator and denominator are integers (and since having $(p,q) \neq (0,0)$ implies that $q^2 - pq - p^2 \neq 0$), the final fraction is an integer if and only if we have
\[  q\bigl( (b-a)p + aq\bigr)  \equiv 0 \pmod{|q^2 - pq - p^2|}.  \]
Since $\gcd(q, q^2 -pq -p^2) = 1$, the number $G(p/q)$ is an integer if and only if
\[  (b-a)p + aq  \equiv 0 \pmod{|q^2 - pq - p^2|}.  \]
A little algebra shows that this is equivalent to having
\begin{equation}
\label{avalue}
a \equiv -bp(q-p)^{-1} \pmod{|q^2 - pq - p^2|}.
\end{equation}
This completes the proof of the lemma.
\end{proof}


Now that we have Lemma \ref{whengood}, we can give the proof of Theorem \ref{thm1}.  Suppose that $p$ and $q$ are relatively prime integers, and that $G(p/q)$ is an integer.  By Lemma \ref{whengood}, we know that $a \equiv -bp(q-p)^{-1} \equiv -bqp^{-1}$ (mod $|q^2 - pq - p^2|$).  To show that $G((q-p)/p)$ is an integer when $p \neq 0$, we have
\[  G((q-p)/p)  =  \frac{p\bigl( (b-a)(q-p) + ap\bigr)}{p^2 - (q-p)p - (q-p)^2}  =   \frac{p\bigl( b(q-p)-a(q-p)+ap\bigr)}{-(q^2 - pq - p^2)}.  \]
The negative sign in the denominator does not matter for determining whether this expression is an integer, so we have $G((q-p)/p) \in \Z$ if and only if
\[  p\bigl(  b(q-p)-a(q-p)+ap\bigr)  \equiv 0 \pmod{|q^2 - pq - p^2|}.  \]
However, if we replace the first occurrence of $a$ by $-bp(q-p)^{-1}$ and the second by $-bqp^{-1}$, we can see that the expression on the left-hand side is in fact congruent to zero.  This completes the proof that $G((q-p)/p) \in \Z$.  The proof that $G(q/(p+q)) \in \Z$ when $p+q \neq 0$ is similar, and will be omitted.  This completes the proof of Theorem \ref{thm1}.

By Theorem \ref{thm1}, we can see that if we have a good $x$-value $x = p/q$ (in lowest terms), then if we form a sequence $H_n$ by setting $H_0 = p$, $H_1 = q$, and $H_n  =  H_{n-1} + H_{n-2}$ for all $n \in \Z$, then all of the values $x = H_n/H_{n+1}$ are good for $(a,b)$, provided only that we have $H_n \neq 0$ for all $n$.  However, if we define our sequence this way, then since $\gcd(p,q)=1$, we have $\gcd(H_n, H_{n+1})=1$ for all $n$.  Therefore, the only way that we could have $H_n = 0$ is if we have either $(H_{n-2}, H_{n-1}) = (1, -1)$ or $(H_{n-2}, H_{n-1}) = (-1, 1)$.  But both of these possibilities occur in the Fibonacci sequence (extended to negative subscripts).  Hence, if we have a good $x$-value $x=p/q$ such that $p$ and $q$ are not consecutive elements of the Fibonacci sequence, then no element of the sequence $H_n$ is equal to 0.

Given these observations, we can prove Corollary \ref{cor1} without much difficulty.  First we deal with the quotients of Fibonacci numbers.

\begin{lemma}
\label{fibfam}
If $(a,b) \in \Z^2$, then the values $x=F_n/F_{n+1}$ with $n \neq -1$ are all good for $(a,b)$.
\end{lemma}
\begin{proof}
The value $n =-1$ is excluded because $F_0 = 0$ may not be the denominator.  For the rest of the values, by Theorem \ref{thm1} it suffices to prove that both $x=F_0/F_1 = 0$ and $x = F_{-2}/F_{-1} = -1$ are good.  But it is trivial to see that $G(0) = a$ and $G(-1) = 2a-b$ are both integers.  This completes the proof.
\end{proof}

Now that we have shown that the $x$-values coming from the Fibonacci sequence are good for all $(a,b)$, we will often assume throughout the rest of this article that the family of $x$-values that we are dealing with does \textit{not} come from the Fibonacci sequence.  This allows us to simplify our proofs a bit, since as mentioned above, for other families of $x$-values we do not need to worry about the possibility that the recursion formula gives us a denominator of zero.  We now begin the proof of the second half of Corollary \ref{cor1}.

\begin{lemma}
\label{afam}
For a choice of the parameter $(a,b)$, define a sequence $H_n$ by setting $H_0 = -b$, $H_1 = a$, and $H_n = H_{n-1} + H_{n-2}$ for all $n \in \Z$.  Then the values $x = H_n/H_{n+1}$ are good for $(a,b)$ whenever $H_{n+1} \neq 0$.
\end{lemma}
\begin{proof}
If $-b$ and $a$ are consecutive Fibonacci numbers, or if they are consecutive Fibonacci numbers multiplied by the same nonzero integer, then we are done by Lemma \ref{fibfam}.  Otherwise, we have $H_n \neq 0$ for all $n$, and it suffices to check that $x = H_0/H_1 = -b/a$ is good for $(a,b)$.  But we can see that $G(-b/a) = a$, completing the proof.
\end{proof}

Our next lemma completes the proof of Corollary \ref{cor1}.

\begin{lemma}
\label{afamvalues}
The values of $x$ obtained in Lemma \ref{afam} are exactly the values $x = -G_{n+1}/G_n$, where $n \in \Z$.
\end{lemma}
\begin{proof}
We begin by showing that for all $n$, we have
\begin{equation}
\label{GHrelation}
H_n = (-1)^{n+1}G_{1-n}.
\end{equation}
This is true for $n = 0$ and $n = 1$.  Suppose that it is true for all nonnegative $n$ up to $n=k-1$.  Then we have
\begin{align*}
H_k  &amp;  =  H_{k-1} + H_{k-2}\\
  &amp;  =   (-1)^kG_{2-k}  +  (-1)^{k-1} G_{3-k}\\
  &amp;  =   (-1)^{k-1} ( -G_{2-k} + G_{3-k})\\
  &amp;  =   (-1)^{k-1} G_{1-k}\\
  &amp;  =   (-1)^{k+1} G_{1-k},
\end{align*}
as desired.  The proof that the formula holds for all negative $n$ is similar.

Finally, using the relation \eqref{GHrelation}, we have
\[  H_n/H_{n+1} = -G_{-n+1}/G_{-n}  \quad\mbox{and}\quad  -G_{n+1}/G_n  =  H_{-n}/H_{-n+1}  \]
for each integer $n$.  This shows that the values of $-G_{n+1}/G_n$ are exactly the ratios of successive terms of the $H$ sequence, completing the proof.
\end{proof}


We now prove Theorem \ref{thm2}, in which we study the problem from the other point of view.  That is, we assume that we are given a sequence $H_n$ satisfying the Fibonacci recurrence and ask for which $(a,b)$ the values $x = H_n / H_{n+1}$ are good.  The proof essentially just combines Lemma \ref{whengood} and Theorem \ref{thm1}.  Theorem \ref{thm2} is clearly true when $H_n$ is the Fibonacci sequence, so suppose that this is not the case.  Then no term of the sequence $H_n$ is zero.  Theorem \ref{thm1} then implies that the all the values $x = H_n/H_{n+1}$ are good for $(a,b)$ if and only if $x = H_0/H_1 = p/q$ is good for $(a,b)$.  But Lemma \ref{whengood} says that this happens if and only if $a \equiv -bp(q-p)^{-1} \equiv -bqp^{-1}$ (mod $|q^2 - pq - p^2|$).  Finally, to show that there are infinitely many pairs $(a,b)$ for which the family is good, we simply note that we can choose any integer we like for $b$, and then there are infinitely many integers $a$ such that $a \equiv -bqp^{-1}$ (mod $|q^2 - pq - p^2|$).

\begin{example}
Let $L_n$ be the Lucas sequence, so that $p = L_0 = 2$ and  $q = L_1 = 1$.  Then Theorem \ref{thm2} shows that the ratios $L_n / L_{n+1}$ all produce integer values of $G(x) = G^{(a,b)}(x)$ if and only if $a \equiv 2b$ (mod $5$).  Thus, for each $b$, there are infinitely many $a$ such that the ratios of successive Lucas numbers are good for $(a,b)$.
\end{example}









\section{Finding all good $x$-values for $(a,b)$}
\label{secgoodvals}
In this section, we will prove Theorem \ref{thm3}.  That is, given the pair $(a,b)$, we will see how to find all rational $x$ such that $G(x) = G^{(a,b)}(x)$ is an integer.  Following Pongsriiam's \cite{pong} ideas, suppose that $k \in \Z$ with $k \neq 0$ and that $G(x) = k$.  Solving this equation for $x$, we find that 
\begin{equation}
\label{xformula}
x = \frac{a-b-k \pm \sqrt{5k^2 + (2b-6a)k + (a-b)^2}}{2k}.
\end{equation}
In order for $x$ to be rational, we need the expression under the square root to be a perfect square.  For a particular value $x = p/q$, we will write the square root term as $M(a,b,p,q)$, where we take $M$ to be positive or negative as needed so that we can write
\begin{equation}
\label{xmformula}
x  =  \frac{p}{q}  =  \frac{a-b-k+M(a,b,p,q)}{2k}.
\end{equation}
Solving this for $M(a,b,p,q)$ and using the fact that
\[  k  =  G\bigg(\frac{p}{q}\bigg)  =  \frac{q\bigl( (b-a)p + aq\bigr)}{q^2 - pq - p^2},  \]
we find that
\begin{equation}
\label{Mformula}
M(a,b,p,q)  =  \frac{(2p+q) \bigl( (b-a)p + aq\bigr)}{q^2 - pq - p^2} - a + b.
\end{equation}
We now give some facts about the expression $M(a,b,p,q)$ which are useful.  Note that since we are no longer considering $x$-values coming from the Fibonacci sequence, the conditions that $q \neq 0$ and $p+q \neq 0$ and $p+2q \neq 0$ are automatically satisfied.

\begin{lemma}
\label{Mlem}
Suppose that $(a,b) \in \Z^2$ and that $p, q \in \Z$ with $q \neq 0$ and $p+q \neq 0$ and $p+2q \neq 0$.  Then we have
\begin{equation}
\label{Mrecurrence}
M(a, b, p+q, p+2q)  =  -3M(a, b, q, p+q) - M(a,b,p,q)
\end{equation}
and
\begin{equation}
\label{Mquadratic}
M(a,b,p,q)^2  +  3M(a,b,p,q)M(a,b,q,p+q)  +  M(a,b,q,p+q)^2  =  a^2 + ab - b^2.
\end{equation}
\end{lemma}
\begin{proof}
We use the computer algebra system
{\tt Maple} to do the algebra necessary to verify these identities.  If we define $M(a,b,p,q)$ as in \eqref{Mformula}, then the command
\begin{verbatim}
simplify(M(a, b, p + q, p + 2*q) + 3*M(a, b, q, p + q) + 
                    M(a, b, p, q));
\end{verbatim}
produces the output 0 and the command
\begin{verbatim}
simplify(M(a, b, p, q)^2 + 3*M(a, b, p, q)*M(a, b, q, p + q) + 
                    M(a, b, q, p + q)^2);
\end{verbatim}
produces the output $a^2 + ab - b^2$.  This completes the proof.
\end{proof}

We can use \eqref{Mrecurrence} and  \eqref{Mquadratic} to reduce the problem of finding all families of good $x$-values to a finite computation.  To do this, suppose that $x$ is good for $(a,b)$ and consider the $M$-values coming from the family of good values containing $x$.  We will show that at least one of these $M$-values is small in a sense that we make precise in the next two lemmas.  The results of these lemmas depend on the sign of $a^2 + ab - b^2$, so we note that since $(a,b) \neq (0,0)$, this expression cannot equal 0.

\begin{lemma}
\label{Mneg}
Suppose that $a^2 + ab - b^2 &lt; 0$ and that $x$ is good for $(a,b)$.  Then the set of $M$-values corresponding to the family of good numbers including $x$ contains an element $M_0$ with $|M_0| \leq \sqrt{|a^2 + ab - b^2|}$.
\end{lemma}
\begin{proof}
Choose $M_0 = M(a,b,p,q)$ such that $|M_0|$ is minimal among the $M$-values under consideration, and define $M_1 = M(a, b, q, p+q)$ and $M_{-1} = M(a, b, q-p, p)$.  Note that $M_0 = 0$ is impossible by \eqref{Mquadratic}.  Also, since $a^2 + ab - b^2 &lt; 0$, we see by \eqref{Mquadratic} that both $M_1$ and $M_{-1}$ have the opposite sign from $M_0$.

Suppose first that $M_0 &gt; 0$.  Then $M_1, M_{-1} &lt; 0$.  Since $|M_0|$ is minimal, we in fact have $M_1, M_{-1} \leq -M_0$.  Using \eqref{Mrecurrence}, we see that
\[  M_1  =  -3M_0 - M_{-1}  \leq -M_0,  \]
which gives $M_{-1} \geq -2M_0$.  Therefore, there is a real number $t$, with $-2 \leq t \leq -1$, such that $M_{-1} = tM_0$.  An essentially identical argument shows that we can also find such a $t$ when $M_0 &lt; 0$.  From \eqref{Mquadratic}, we have
\[  M_{-1}^2 + 3M_{-1}M_0 + M_0^2  =  a^2 + ab - b^2,  \]
whence
\[  M_0^2  =  \frac{a^2 + ab - b^2}{t^2 + 3t + 1}  =  \frac{|a^2 + ab - b^2|}{|t^2 + 3t + 1|}.  \]
Since $-2 \leq t \leq -1$, we have $-1.25 \leq t^2 + 3t + 1 \leq -1$, and therefore $|t^2 + 3t + 1| \geq 1$.  This gives us
\[  M_0^2 \leq |a^2 + ab - b^2|,  \]
which obviously implies $|M_0| \leq \sqrt{|a^2 + ab - b^2|}$.
\end{proof}

\begin{lemma}
\label{Mpos}
Suppose that $a^2 + ab - b^2 &gt; 0$, and that $x$ is good for $(a,b)$.  Then the set of $M$-values corresponding to the family of good numbers including $x$ contains an element $M_0$ with $|M_0| \leq \sqrt{\frac{1}{5}(a^2 + ab - b^2)}$.
\end{lemma}
\begin{proof}
Define $M_{-1}$, $M_0$, and $M_1$ as in the proof of Lemma \ref{Mneg}.  If it happens that $M_0 = 0$, then we are done, so suppose that $M_0 \neq 0$.  We first show that either the pair $M_{-1}, M_0$ or the pair $M_0, M_1$ have the same sign.  Assume that this is false, and that $M_{-1}$ and $M_1$ both have the opposite sign from $M_0$.  Then we may proceed as in the proof of Lemma \ref{Mneg} to show that
\begin{equation}
\label{M0equation}
M_0^2  =  \frac{a^2 + ab - b^2}{t^2 + 3t + 1},
\end{equation}
where $-2 \leq t \leq -1$.  However, the right-hand side of \eqref{M0equation} is negative, providing a contradiction.

Now, set $N$ to be either $M_{-1}$ or $M_1$, whichever value has the same sign as $M_0$.  Then by \eqref{Mquadratic}, we have
\begin{align*}
a^2 + ab - b^2  &amp;  =  M_0^2  +  3M_0N  +  N^2\\
  &amp;  =  |M_0|^2  +  3|M_0||N|  + |N|^2\\
  &amp;  \geq  5|M_0|^2,
\end{align*}
where the inequality follows from the minimality of $|M_0|$.  This immediately leads to the bound $|M_0|  \leq  \sqrt{\frac{1}{5}(a^2 + ab - b^2)}$.
\end{proof}



We can now reduce the problem of finding all the good $x$-values for $(a,b)$ to a finite computation.  Suppose that $(a,b)$ is given.  We know that the family coming from the Fibonacci sequence is good for $(a,b)$.  Next, if possible, we solve the equation $G(x)=0$, obtaining the good value $x = -a/(b-a)$.  This also yields a family of good $x$-values.  Finally, we find all the remaining families.  Define
\begin{displaymath}
C = \begin{cases}
\sqrt{|a^2 + ab - b^2|},  &amp;  \text{if $a^2 + ab - b^2 &lt; 0$;}\\
\sqrt{\frac{1}{5}(a^2 + ab - b^2)},  &amp;   \text{if $a^2 + ab - b^2 &gt; 0$.}
\end{cases}
\end{displaymath}
First, we find all values of $M$ with $0 \leq M \leq C$ such that the equation
\begin{equation}
\label{newquad}
M^2 + 3MN + N^2 = a^2 + ab - b^2
\end{equation}
has an integer solution $N$.  These values, along with their negatives, are all the possible $M$-values with $|M| \leq C$.  For each $M$-value, we may use the relation
\begin{equation}
\label{Msquared}
M^2  =  5k^2 + (2b-6a)k + (a-b)^2
\end{equation}
to find all the possible $k$ associated with this value of $M$.  Then the equation \eqref{xmformula} gives a good $x$-value, which generates a family of good $x$-values.  Since every family of good $x$-values yields at least one $M$-value in our range, all families of good $x$-values are found in this way.  This completes the proof of Theorem \ref{thm3}.

\begin{example}
As a first example, we will take $(a,b) = (14,1)$ and find all families of good $x$-values.  First, we know that all values in the family coming from the Fibonacci sequence are good for $(14, 1)$.  Solving the equation $G(x) = 0$ gives $x = 14/13$, which leads to the family
\[  \ldots, \frac{-16}{15}, \frac{15}{-1}, \frac{-1}{14}, \frac{14}{13}, \frac{13}{27}, \frac{27}{40}, \frac{40}{67}, \ldots  \]
of good $x$-values, which is the family given in Lemma \ref{afam}.  To find other families, the equation \eqref{newquad} becomes
\[  M^2 + 3MN + N^2  =  209,  \]
and we need to find all $M$ with $|M| \leq \sqrt{209/5} \approx 6.46$ such that \eqref{newquad} has an integer solution $N$.  If we test all the integers $M$ with $0 \leq M \leq 6$, then we find that $M = 1$ and $M = 5$ have the property we need.  Hence the values with $|M| \leq 6$ having the property are $M = -5, -1, 1, 5$.  For $M = -5$, the relation \eqref{Msquared} becomes
\[  25  =  5k^2 -82k + 169.  \]
This leads to the possible $k$-values of 2 and $72/5$.  We discard the latter as $72/5$ is not an integer, and we see that $(a,b,k,M) = (14,1,2,-5)$ leads by \eqref{xmformula} to $x = 3/2$.  Thus every element of the family 
\[  \ldots, \frac{-5}{4}, \frac{4}{-1}, \frac{-1}{3}, \frac{3}{2}, \frac{2}{5}, \frac{5}{7}, \frac{7}{12}, \ldots  \]
is a good $x$-value for $(a,b) = (14,1)$.  Similarly, the value $M = -1$ leads to $x = -1/14$, which yields (again) the family given in Lemma \ref{afam}, and the value $M=1$ leads to $x=0$, which yields (again) the family of ratios of Fibonacci numbers given in Lemma \ref{fibfam}.  Finally, the value $M = 5$ leads to the family
\[  \ldots, \frac{-10}{7}, \frac{7}{-3}, \frac{-3}{4}, \frac{4}{1}, \frac{1}{5}, \frac{5}{6}, \frac{6}{11}, \ldots,  \]
which is the last family of good $x$-values for $(14, 1)$.
\end{example}

\begin{example}
\label{nofibex}
Let $a=1$ and $b=11$, so that $a^2 + ab - b^2 = -109$.  As above, we know that the family coming from the Fibonacci sequence is good for $(1, 11)$.  Solving the equation $G(x) = 0$ gives $x = -1/10$, which leads to the family
\[  \ldots, \frac{23}{-12}, \frac{-12}{11}, \frac{11}{-1}, \frac{-1}{10}, \frac{10}{9}, \frac{9}{19}, \frac{19}{28}, \ldots  \]
of good values, which is the family from Lemma \ref{afam}.  Searching for other families, the equation \eqref{newquad} becomes $M^2 + 3MN + N^2 = -109$, and we need to find integers $M$ with $|M| \leq \sqrt{|-109|} \approx 10.4$ such that at least one corresponding $N$ is an integer.  The only such values are $M = 10$ and $M = -10$.  However, when we use \eqref{Msquared} to find the corresponding value of $k$, we see that both of these $M$-values yield $k = 0$.  Thus we do not obtain additional families of good $x$-values.
\end{example}

\begin{remark}
Note that in Example \ref{nofibex}, we did not obtain the family coming from the Fibonacci sequence when solving the equation \eqref{Mquadratic} and using the $M$-values.  This is because the smallest $M$-value in this family is $M(a,b,p,q) = M(1, 11, 1, 0) = -10$.  However, $(p,q) = (1,0)$ corresponds to the ``fraction'' $1/0$, which is undefined.  It is for this reason that we treat this family in separately in our method.  Similarly, we treat the family coming from the solution of $G(x) = 0$ separately because having $k=0$ leads to a zero in the denominator of \eqref{xformula}.  No other family can lead to any of our equations having zeros in the denominator, so only these two families need to be treated separately.
\end{remark}

\begin{remark}
After this example, it seems natural to ask about pairs $(a,b)$ for which the only good families of $x$-values are those given in Lemma \ref{fibfam} and Lemma \ref{afam}.  If we study pairs of the form $(a,1)$, a computer search shows that there are 311 values of $a$ with $3 \leq a \leq 1000$ such that the pair $(a,1)$ has only these two families of good $x$-values.  We conjecture that infinitely many such pairs exist.  Note in the opposite direction that Theorem \ref{thm3} shows that there are infinitely many $(a,b)$ that have more families of good $x$-values than the two given by these lemmas.
\end{remark}









\section{Acknowledgments}
\label{secacknowledgements}
The author would like to thank Professor Paulo H.\ A.\ Rodrigues (Universidade Federal de Goi\'as) and Professor Bruno de Paula Miranda (Instituto Federal de Goi\'as) for some very helpful conversations about this problem.  Those conversations led to a proof that there are infinitely many values of $a$ such that the pair $(a,1)$ has more good $x$-values than the ones given in Lemma \ref{fibfam} and Lemma \ref{afam}, although that proof was much different than the one given here.  The author would also like to thank the anonymous referee and the editor for their helpful comments.





\begin{thebibliography}{1}

\bibitem{bul-lee}
A.~Bulawa and W.~K. Lee, Integer values of generating functions for the
  {F}ibonacci and related sequences, {\em Fibonacci Quart.} {\bf 55} (2017),
  74--81.

\bibitem{eng-bic}
D.~A. Englund and M.~Bicknell-Johnson, Maximal subscripts within generalized
  {F}ibonacci sequences, {\em Fibonacci Quart.} {\bf 38} (2000), 104--113.

\bibitem{hong}
D.~S. Hong, When is the generating function of the {F}ibonacci numbers an
  integer?, {\em College Math. J.} {\bf 46} (2015), 110--112.

\bibitem{hor}
A.~F. Horadam, A generalized {F}ibonacci sequence, {\em Amer. Math. Monthly}
  {\bf 68} (1961), 455--459.

\bibitem{koshy}
T.~Koshy, {\em Fibonacci and {L}ucas Numbers with Applications}, 
Wiley-Interscience, 2001.

\bibitem{petho}
A.~Peth\H{o}, The {P}ell sequence contains only trivial perfect powers.
\newblock In {\em Sets, Graphs and Numbers ({B}udapest,
1991)}, Vol.~60 of {\em Colloq. Math. Soc. J\'{a}nos Bolyai},
pp.\ 561--568. North-Holland, 1992.

\bibitem{pong}
P.~Pongsriiam, Integral values of the generating functions of {F}ibonacci and
  {L}ucas numbers, {\em College Math. J.} {\bf 48}(2) (2017), 97--101.

\bibitem{tag}
A.~Tagiuri, Di alcune successioni ricorrenti a termini interi e positivi, {\em
  Periodico di Matematica} {\bf 16} (1901), 1--12.

\end{thebibliography}


\bigskip
\hrule
\bigskip

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

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

\bigskip
\hrule
\bigskip

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

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received June 8 2023;
revised version received February 14 2024.
Published in {\it Journal of Integer Sequences}, February 21 2024.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                




</pre></body></html>