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

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

\usepackage{mathtools}
\usepackage{stmaryrd}
\usepackage{graphicx}

\usepackage[capitalise]{cleveref}

\DeclareMathOperator{\sign}{sgn}
\newcommand{\Int}{\mathbb{Z}}
\newcommand{\abs}[1]{\left| #1 \right|}

\newcommand{\seqx}[1]{\left(#1\right)}
\newcommand{\seq}[2][n\in\Int]{\seqx{#2}_{#1}}
\newcommand{\cv}[2]{\bigl(\!\begin{smallmatrix}{#1}\\{#2}\end{smallmatrix}\!\bigr)}

\newcommand{\Wo}{\mathbf{W}}
\newcommand{\Uo}{\mathbf{U}}
\newcommand{\Vo}{\mathbf{V}}
\newcommand{\Wx}[2]{\Wo(#1;\,#2)}
\newcommand{\Ux}[1]{\Uo(#1)}
\newcommand{\Vx}[1]{\Vo(#1)}
\newcommand{\Wn}[3][n]{W_{#1}(#2;\,#3)}
\newcommand{\Un}[2][n]{U_{#1}(#2)}
\newcommand{\Vn}[2][n]{V_{#1}(#2)}
\DeclareMathOperator{\eValue}{e}
\newcommand{\bbrackets}[1]{\left\llbracket #1 \right\rrbracket}
\newcommand{\GCDs}[4][n]{\bbrackets{#2}\!(#3,\,#4)_{#1}}
\newcommand{\pW}[1]{{#1}^{\oplus}}
\newcommand{\nW}[1]{{#1}^{\ominus}}
\newcommand{\pfun}{f^{\oplus}}
\newcommand{\nfun}{f^{\ominus}}

\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 
Greatest Common Divisors of \\
\vskip .1in
Shifted Horadam Sequences
}
\vskip 1cm
\large
Kwang-Wu Chen and 
Yu-Ren Pan\footnote{This work is partially supported by the Ministry of Science and Technology of Taiwan under Grant No.\ MOST 107CFA9600025.}$\vphantom{X}^{,}$\footnote{Corresponding author.}\\
Department of Mathematics\\
University of Taipei\\
No.\ 1,  Aiguo West Road, Taipei 10048\\
Taiwan\\
\href{mailto:kwchen@uTaipei.edu.tw}{\texttt{kwchen@uTaipei.edu.tw}}\\
\href{mailto:YuRen.Pan.0117@gmail.com}{\texttt{YuRen.Pan.0117@gmail.com}}\\
\end{center}

\vskip .2 in

\begin{abstract}
A Horadam sequence is a sequence generated by the second-order linear
homogeneous recurrence relation $W_n = pW_{n-1} - qW_{n-2}$; $W_0 =
a,\ W_1 = b$.  The sequence of Fibonacci numbers is a particular
case of a Horadam sequence.  For any fixed integers $s$, $t$, and
$k$, we investigate the boundedness and periodicity of the sequence
$\seqx{\gcd(W_n+s,\ W_{n+k}+t)}$ in this paper.
\end{abstract}



\section{Introduction}\label{sec:Introduction}

The general second-order linear homogeneous recurrence relation
\begin{equation}\label{Wn_def}
  W_n = pW_{n-1} - qW_{n-2}; \quad W_0 = a,\ W_1 = b,
\end{equation}
with arbitrary values $a$, $b$, $p$, and $q$ generates the sequence $\Wx{a,b}{p,q} = \seq{\Wn{a,b}{p,q}}$ which we call a Horadam sequence after the work of Horadam \cite{horadam1965}.
In general, we also call $\seqx{\Wn{a,b}{p,q}}$ a second-order recurrence sequence.
We usually omit the $(a,b;\,p,q)$ if it does not cause ambiguity.
For any sequence $\seqx{W_n}$, we define \cite[Eq.~(1.9)]{horadam1965}
\[
  \eValue(W) \coloneqq pab - qa^2 - b^2 = W_0 W_2 - W_1^2.
\]

Let $\Ux{p,q} = \seq{\Un{p,q}}$ and $\Vx{p,q} = \seq{\Vn{p,q}}$ denote the Lucas sequence of the first kind and the second kind respectively, which can be defined by
\[
  \Ux{p,q} = \Wx{0,1}{p,q} \text{ and } \Vx{p,q} = \Wx{2,p}{p,q}.
\]
Fibonacci numbers $\seqx{F_n} = \Ux{1,-1}$ and Lucas numbers $\seqx{L_n} = \Vx{1,-1}$ are the most famous particular cases of Lucas sequences.
Conversely, the families of sequences $\Wx{a,b}{p,q}$, $\Ux{p,q}$, and $\Vx{p,q}$ can be seen as generalizations of Fibonacci numbers and Lucas numbers.

Horadam and Lucas sequences have several relations, such as the fact \cite[Eq.~(4.10)]{horadam1965} that
\begin{equation}\label{Vn_U2n_div_Un}
  V_n = U_{2n} / U_n,
\end{equation}
and the known expression \cite[Eq.~(2.14)]{horadam1965}
\begin{equation}\label{Wn_to_Un}
  W_n = bU_n - aqU_{n-1}.
\end{equation}
Also, for any integers $n$, $m$, and $k$, we have the identity \cite[p.~171]{horadam1965}
\begin{equation}\label{Wn_Wm}
  W_n W_m - W_{n+1} W_{m-1} = q^k(W_{n-k} W_{m-k} - W_{n-k+1} W_{m-k-1}).
\end{equation}

The sequence $\seqx{W_n} = \Wx{a,b}{p,q}$ can be defined in any number system, but it is often considered in integers.
Although $\seqx{W_n}$ is usually considered with indices in natural numbers, we can extend the indices to include negative integers by the relation $W_{n-2} = pW_{n-1}/q - W_n/q$ if $q \ne 0$.
Note that if $\seqx{W_n}$ takes integer values at non-negative indices and $|q| = 1$, then the terms with negative index are also integers.

For any sequence $\seqx{W_n}$ and any integer $s$, we consider a slightly different sequence $\seqx{W_n + s}$ which we call a \emph{shifted} sequence.
Chen \cite{chen2011} showed that the gcds of shifted Fibonacci numbers $\gcd(F_n+s,\ F_{n+1}+s)$ are bounded if $s \ne \pm 1$.
This case is not unique.
Ray and Pradhan \cite{ray2017} found that the gcds of shifted balancing numbers $\gcd(B_n-s,\ B_{n+1}-6s)$ with $\seqx{B_n} \coloneqq \Ux{6,1}$ are also bounded when $s \ne \pm 1$.
Additionally, for $f(n) \coloneqq \Wn{a,b}{p,-1}$, Spilker \cite{spilker2016} showed that $t_s(n) \coloneqq \gcd(f(n)+s,\ f(n+1)+s)$ divides an integer $m$ depending on $a$, $b$, $p$, and $s$.
Spilker also proved that $t_s(n)$ is simply periodic if $m \ne 0$.

Motivated by those three results, we consider a more general case: the greatest common divisor of two shifted sequences $\seqx{W_n+s}$ and $\seqx{W_{n+k}+t}$ with $|q|=1$.
Not only the Fibonacci and the balancing numbers but also some famous sequences of numbers are under the domain we considered.
We list some of the sequences of numbers as follows.
\begin{table}[H]
  \centering
  \begin{tabular}{ l l | r r r r | c }
    name                    &       & $a$ & $b$ & $p$ &  $q$ & OEIS number\\
    \hline
    Fibonacci numbers       & $F_n$ & $0$ & $1$ & $1$ & $-1$ & \seqnum{A000045}\\
    Lucas numbers           & $L_n$ & $2$ & $1$ & $1$ & $-1$ & \seqnum{A000032}\\
    Pell numbers            & $P_n$ & $0$ & $1$ & $2$ & $-1$ & \seqnum{A000129}\\
    Pell-Lucas numbers      & $Q_n$ & $2$ & $2$ & $2$ & $-1$ & \seqnum{A002203}\\
    balancing numbers       & $B_n$ & $0$ & $1$ & $6$ &  $1$ & \seqnum{A001110}\\
    Lucas-balancing numbers & $C_n$ & $1$ & $3$ & $6$ &  $1$ & \seqnum{A001541}
  \end{tabular}
  \caption{Some second-order recurrence sequences with $|q| = 1$.}
\end{table}

In this paper, we settle down all the values of $\seq{\gcd(W_n+s,\ W_{n+k}+t)}$ with $|q| = 1$ for any given $s$, $t$, and $k$.
If $\seqx{\gcd(W_n+s,\ W_{n+k}+t)}$ is bounded, then it must be periodic.
If $\seqx{\gcd(W_n+s,\ W_{n+k}+t)}$ is unbounded, then we can give a method to justify its boundedness and compute the values of the unbounded greatest common divisors $\gcd(W_n+s,\ W_{n+k}+t)$.

Let $\GCDs{W}{s}{t} \coloneqq \gcd(W_n+s,\ W_{n+1}+t)$ for any integers $s$, $t$, and any sequence $\seqx{W_n}$.
In this paper, we study the values of $\GCDs{W}{s}{t}$ with $|q| = 1$ for any integer $n$.
In \Cref{sec:BoundednessAndPeriodicity}, we extend the methods inspired by Spilker \cite{spilker2016} and use them to find a multiple and a period of $\seqx{\GCDs{W}{s}{t}}$.
The first theorem we proved in \Cref{sec:BoundednessAndPeriodicity} is the 
following:
\begin{theorem}\label{Thm:gcd_WS_div}
  For any integers $s$, $t$, and $n$,
  \begin{equation}\label{ThmEq:gcd_WS_div}
    \GCDs{\Wx{a,b}{p,q}}{s}{t} \text{ divides } q^n\eValue(\Wx{a,b}{p,q}) - \eValue(\Wx{s,t}{p,q}).
  \end{equation}
\end{theorem}

For our convenience, let $\seqx{S_n} = \Wx{s,t}{p,q}$ denote the sequence generated by the given shift values $s$ and $t$.
\Cref{Thm:gcd_WS_div} shows that if $q^n\eValue(W) - \eValue(S) \ne 0$ and $|q|=1$, then the terms of $\seqx{\GCDs{W}{s}{t}}$ are bounded by $\abs{q^n\eValue(W) - \eValue(S)}$.
We can see how this result helps us determine the value of each bounded term of $\seqx{\GCDs{W}{s}{t}}$ in \Cref{sec:BoundednessAndPeriodicity}.

In \Cref{sec:Transformations}, we derive two theorems.
The first theorem gives us a way to apply our work to the general case $\gcd(W_n+s,\ W_{n+k}+t)$ where $n$ and $k$ are any integers.
The second theorem, which provides a way to reduce problems into basic cases, is the following:
\begin{theorem}\label{Thm:gcd_move_shift}
  For any integers $n$ and $k$, if $|q| = 1$, then we have
  \begin{equation}\label{ThmEq:gcd_move_shift}
    \GCDs{W}{S_0}{S_1} = \GCDs[n+k]{W}{S_k}{S_{k+1}}.
  \end{equation}
\end{theorem}

In \Cref{sec:MethodsAndUnboundedCases,sec:ComputationsForUnboundedCases}, we use a method inspired by Chen's work \cite{chen2011} and Conway's topograph \cite[Lecture~1]{conway1997} to compute the values of unbounded $\seqx{\GCDs{W}{s}{t}}$ when $q^n\eValue(W) - \eValue(S) = 0$.
In \Cref{sec:Examples}, we show some examples of some famous sequences of numbers.



\section{Boundedness and periodicity of \texorpdfstring{$\seqx{\GCDs{W}{s}{t}}$}{([W](s,t)n)}}\label{sec:BoundednessAndPeriodicity}

Spilker's work \cite[p.~478]{spilker2016} gave a way to find a multiple of $\GCDs{\Wx{a,b}{p,-1}}{s}{s}$.
In the following proof, we generalize Spilker's result into a more general case.
\begin{proof}[Proof of \cref{Thm:gcd_WS_div}]
  By \eqref{Wn_Wm}, we get
  \[
    W_{n-1}W_{n+1} - W_n^2 = q^{n-1}(W_0W_2 - W_1^2) = q^{n-1} \eValue(W).
  \]
  Let $d$ be the gcd of $W_n+s$ and $W_{n+1}+t$, that is, $d = \GCDs{W}{s}{t}$.
  Then we have
  \begin{align*}
    qW_{n-1}W_{n+1} - qW_n^2 &=      (pW_n - W_{n+1})W_{n+1} - qW_n^2\\
                             &\equiv pst - t^2 - qs^2 = \eValue(S) \pmod{d}.
  \end{align*}
  Consequently, we have $\GCDs{W}{s}{t}$ divides $q^n\eValue(W) - \eValue(S)$.
\end{proof}

We see that the multiple $m = q^n\eValue(W) - \eValue(S)$ could be getting bigger for large $n$ if $|q| > 1$.
However, when $|q| = 1$, $m$ become some constants as a function of $n$ (depending only on $\seqx{W_n}$, $\seqx{S_n}$, and the parity of $n$).
Moreover, if the multiple $m$ is a nonzero constant, then the terms of $\seqx{\GCDs{W}{s}{t}}$ are bounded by $|m|$.
We let $\seqx{\pW{W}_n}$ and $\seqx{\nW{W}_n}$ denote the cases that $q = 1$ and $q = -1$ respectively for any sequence $\seqx{W_n}$.

\begin{corollary}\label{Thm:gcd_WS_pos_div}
  For any integers $s$, $t$, and $n$,
  \[
    \GCDs{\pW{W}}{s}{t} \text{ divides } \eValue(\pW{W}) - \eValue(\pW{S}).
  \]
\end{corollary}

\begin{corollary}\label{Thm:gcd_WS_neg_div}
  For any integers $s$, $t$, and $n$,
  \begin{enumerate}
  \item $\GCDs[2n-1]{\nW{W}}{s}{t}$ divides $\eValue(\nW{W}) + \eValue(\nW{S})$;
  \item $\GCDs[2n]{\nW{W}}{s}{t}$ divides $\eValue(\nW{W}) - \eValue(\nW{S})$.
  \end{enumerate}
\end{corollary}

\begin{example}[{\cite[Thm.~3.6, 3.7]{ray2017}}]
  Let $\seqx{G^B_n} = \Wx{a,b}{6,1}$ be the generalized balancing-like sequences.
  For any integers $s$ and $n$, if $a^2+b^2-6ab-s^2 \ne 0$, then we have
  \begin{equation*}
    \GCDs{G^B}{-s}{-6s} \le |a^2+b^2-6ab-s^2|.
  \end{equation*}
\end{example}
\begin{proof}
  Since $q=1$, $\seqx{\pW{S}_n} = \Wx{-s,-6s}{6,1}$.
  Then by \Cref{Thm:gcd_WS_pos_div}, for any $n$,
  \begin{align*}
    \MoveEqLeft \GCDs{G^B}{-s}{-6s} \text{ divides } \eValue(G^B) - \eValue(\pW{S})\\
      &= (6ab - a^2 - b^2) - (6(-s)(-6s) - (-s)^2 - (-6s)^2) = 6ab - a^2 - b^2 + s^2.
  \end{align*}
  As we mentioned before,
if the common multiple $6ab - a^2 - b^2 + s^2$ is not zero, then the terms of $\seqx{\GCDs{G^B}{-s}{-6s}}$ are bounded by $|6ab-a^2-b^2+s^2|$.
\end{proof}

\begin{example}[{\cite[Thm.~1, 2]{chen2011}}]
  Let $\seqx{G^F_n} = \Wx{a,b}{1,-1}$ be the generalized Fibonacci sequences (in Chen's paper \cite{chen2011}, $G_{n+1} = G^F_n$).
  For any integers $s$ and $n$,
  \begin{enumerate}
    \item if $a^2-b^2+ab+s^2 \ne 0$, then we have $\GCDs[2n-1]{G^F}{s}{s} \le |a^2-b^2+ab+s^2|$;
    \item if $a^2-b^2+ab-s^2 \ne 0$, then we have $\GCDs[2n]{G^F}{s}{s} \le |a^2-b^2+ab-s^2|$.
  \end{enumerate}
\end{example}
\begin{proof}
  Since $q=-1$, $\seqx{\nW{S}_n} = \Wx{s,s}{1,-1}$.
  Then by \Cref{Thm:gcd_WS_neg_div}, for any $n$,
  \begin{align*}
    \MoveEqLeft \GCDs[2n-1]{G^F}{s}{s} \text{ divides } \eValue(G^F) + \eValue(\nW{S})\\
      &= (ab + a^2 - b^2) + (s^2 + s^2 - s^2) = ab + a^2 - b^2 + s^2;\\
    \MoveEqLeft \GCDs[2n]{G^F}{s}{s} \text{ divides } \eValue(G^F) - \eValue(\nW{S})\\
      &= (ab + a^2 - b^2) - (s^2 + s^2 - s^2) = ab + a^2 - b^2 - s^2.
  \end{align*}
  As we mentioned before, on the one hand, if the common multiple $ab + a^2 - b^2 + s^2$ is not zero, then the terms of $\seqx{\GCDs[2n-1]{G^F}{s}{s}}$ are bounded by $|a^2-b^2+ab+s^2|$.
  On the other hand, if the common multiple $ab + a^2 - b^2 - s^2$ is not zero, then the terms of $\seqx{\GCDs[2n]{G^F}{s}{s}}$ are bounded by $|a^2-b^2+ab-s^2|$.
\end{proof}

By using the method inspired by Spilker \cite[p.~478]{spilker2016}, we can find a period of the function $n \mapsto \GCDs{W}{s}{t}$.
The period can help us determine the values of $\seqx{\GCDs{W}{s}{t}}$, that is, we only need to compute the values of one period.

\begin{theorem}\label{Thm:periodic}
  For any linear integer function $\phi(n)$, if $\GCDs[\phi(n)]{W}{s}{t}$ divides a nonzero integer constant $m$ for all integers $n$, then the function $n \mapsto \GCDs[\phi(n)]{W}{s}{t}$ is simply periodic.
  That is to say, there exists an integer $\omega \le m^2$ such that $\GCDs[\phi(n)]{W}{s}{t} = \GCDs[\phi(n+\omega)]{W}{s}{t}$ for all $n$.
\end{theorem}
\begin{proof}
  Since the vector-valued mapping
  \[
    n \mapsto
    \begin{pmatrix}
      W_{n} \bmod m\\
      W_{n+1} \bmod m
    \end{pmatrix}
  \]
  has only finitely many values, there are integers $\omega_1$ and $\omega_2$ such that $0 \le \omega_1 < \omega_2 \le m^2$ and
  \begin{align*}
    W_{\omega_1} \equiv W_{\omega_2} \pmod{m}, && W_{\omega_1 + 1} \equiv W_{\omega_2 + 1} \pmod{m}.
  \end{align*}
  By the recurrence relation \eqref{Wn_def}, we get $W_{\omega_1 + n} \equiv W_{\omega_2 + n}$ (mod $m$) for all integer $n$;
    together with $\omega \coloneqq \omega_2 - \omega_1 \le m^2$, we obtain
  \[
    W_{n+\omega} \equiv W_n \pmod{m} \quad \forall n \in\Int.
  \]
  Suppose that $\phi(n) = cn+k$ where $c$ and $k$ are integers.
  Since $\GCDs[\phi(n)]{W}{s}{t}$ divides $m$ for all integers $n$, we finally get
  \begin{align*}
    \GCDs[\phi(n)]{W}{s}{t}
    &= \gcd(W_{\phi(n)} + s,\ W_{\phi(n)+1} + t,\ m)\\
    &= \gcd(W_{\phi(n)+c\omega} + s,\ W_{\phi(n)+c\omega+1} + t,\ m)
     = \GCDs[\phi(n+\omega)]{W}{s}{t}
    \qedhere
  \end{align*}
\end{proof}

This result may not give a way to find the smallest period.
Nevertheless, analogously to Spilker's work, a period $\omega \le m^2$ can be chosen by
\begin{align*}
    W_{\omega} \equiv W_0 = a \pmod{m}, && W_{\omega+1} \equiv W_1 = b \pmod{m}.
\end{align*}



\section{Transformations}\label{sec:Transformations}

Although our principal work is about $\GCDs{W}{s}{t}=\gcd(W_n+s,\ W_{n+1}+t)$ in this paper, we can still apply our results to $\gcd(W_n+s,\ W_{n+k}+t)$ for any integer $k$.
The crucial part is the following lemma, which lets us be able to transform the problems about $(W_n,W_{n+k})$ into problems about $(W_n,W_{n+1})$.
That is, we can just study the $(W_n, W_{n+1})$-cases and deal with the demands for $(W_n, W_{n+k})$-cases.
Kili{\c{c}} and St{\u{a}}nic{\u{a}} \cite[Lem.~1]{kilic2011} have proved the following lemma.
However, we give a self-contained proof below.

\begin{lemma}\label{Lem:jump}
  For any sequence $\seqx{W_n}$, a subsequence $\seqx{J_n} = \seq{W_{kn+t}}$ with indices in an arithmetic sequence is again a second-order recurrence sequence; moreover, 
  \begin{equation}\label{LemEq:jump}
    \seqx{W_{kn+t}} = \seqx{J_n} = \Wx{W_t,W_{k+t}}{V_k,q^k}.
  \end{equation}
\end{lemma}
\begin{proof}
  Let $\gamma = W_{kn-k+t}$, and $\gamma^+ = W_{kn-k+t+1}$. By shifting the indices, we have
  \[
    J_{n-1} = \gamma = \Wn[0]{\gamma, \gamma^+}{p,q}, \quad
    J_n = \Wn[k]{\gamma, \gamma^+}{p,q}, \quad
    \text{and } J_{n+1} = \Wn[2k]{\gamma, \gamma^+}{p,q}.
  \]
  By \eqref{Wn_to_Un}, we get $J_n = \gamma^+ U_k - \gamma qU_{k-1}$, so that $\gamma^+ = (1/U_k)J_n + \gamma q(U_{k-1}/U_k)$.
  Then by \eqref{Vn_U2n_div_Un} and \eqref{Wn_to_Un}, we obtain
  \begin{align*}
    J_{n+1}
    &= \gamma^+ U_{2k} - \gamma qU_{2k-1}\\
    &= \frac{U_{2k}}{U_k} J_n - \gamma q \left( U_{2k-1} - \frac{U_{k-1}}{U_k} U_{2k} \right)
     = V_k J_n - q \left( \frac{U_{2k-1} U_k - U_{2k} U_{k-1}}{U_k} \right) J_{n-1}.
  \end{align*}
  Applying \eqref{Wn_Wm} with $k-1$, since $U_0 = 0$ and $U_1 = 1$, we have
  \begin{align*}
    J_{n+1}
    = V_k J_n - q^k \left( \frac{U_k U_1 - U_{k+1} U_0}{U_k} \right) J_{n-1}
    = V_k J_n - q^k J_{n-1},
  \end{align*}
  which form a recurrence relation \eqref{Wn_def} for any $n$.
  In conclusion, $W_{kn+t} = J_n = \Wn[n]{A,B}{P,Q}$ where $A = J_0 = W_t$, $B = J_1 = W_{k+t}$, $P = V_k$, and $Q = q^k$.
\end{proof}

\begin{example}
  By \Cref{Lem:jump}, we get $U_{kn} = \Wn[k]{0,U_n}{V_n,q^n} = U_n\cdot\Un[k]{V_n,q^n}$. Then we can conclude that
  \[
    \frac{U_{2n}}{U_n} = \Un[2]{V_n,q^n} = V_n, \qquad
    \frac{U_{3n}}{U_n} = \Un[3]{V_n,q^n} = V_n^2 - q^n.
  \]
\end{example}

\begin{theorem}\label{Thm:gcd_jump}
  For any integers $s$, $t$, $n$, and $k$, if there exist integers $m$ and $r$ such that $n=km+r$, then we have
  \begin{equation}\label{ThmEq:gcd_jump}
    \gcd(W_n+s,\ W_{n+k}+t) = \GCDs[m]{\Wx{W_r,W_{k+r}}{V_k,q^k}}{s}{t}.
  \end{equation}
\end{theorem}
\begin{proof}
  By \Cref{Lem:jump}, $W_{km+r} = J_m = \Wn[m]{W_r,W_{k+r}}{V_k,q^k}$ for any integer $n$, so that
  \[
    \gcd(W_n+s,\ W_{n+k}+t) = \gcd(J_m+s,\ J_{m+1}+t).
    \qedhere
  \]
\end{proof}

\Cref{Thm:gcd_jump} shows that we can focus only on the gcds with indices in $(n,n+1)$ and deal with the demands for the gcds with indices in $(n,n+k)$.
Note that if $|q| = 1$, then $|q^k| = 1$.

\Cref{Thm:gcd_WS_div} shows that if $\seqx{S_n} = \Wx{s,t}{p,q}$, then $\GCDs{W}{s}{t}$ divides $q^n\eValue(W) - \eValue(S)$.
Moreover, by \eqref{Wn_Wm}, we get $S_kS_{k+2}-S_{k+1}^2 = q^k(S_0S_2-S_1^2)$ for any integer $k$.
Therefore, we can conclude that
\[
  \GCDs{W}{S_k}{S_{k+1}} \text{ divides } q^n\eValue(W) - q^k\eValue(S),
\]
which can be seen as a generalization of \Cref{Thm:gcd_WS_div}.
However, when $|q|=1$, we have a stronger result.
\begin{proof}[Proof of \cref{Thm:gcd_move_shift}]
  Since $W_{n+2} = pW_{n+1} - qW_n$, $S_{n+2} = pS_{n+1} - qS_n$, and $|q| = 1$, we obtain
  \begin{align*}
    \GCDs{W}{S_0}{S_1}
    &= \gcd(W_n + S_0,\ W_{n+1} + S_1)\\
    &= \gcd(-qW_n - qS_0,\ W_{n+1} + S_1)\\
    &= \gcd(W_{n+2} + S_2,\ W_{n+1} + S_1)
     = \GCDs[n+1]{W}{S_1}{S_2}.
  \end{align*}
  Continuing in this manner gives the result.
\end{proof}

\Cref{Thm:gcd_move_shift} gives us a new perspective on the shift values, which is to regard the shift values as the $k$-th and $(k+1)$-th terms of a recurrence sequence $\seqx{S_n} = \Wx{s,t}{p,q}$ for some $s$, $t$, and $k$.
It also makes the result of \Cref{Thm:gcd_WS_div} more reasonable.
By \Cref{Thm:gcd_move_shift}, we can reduce the shift values to some small numbers.
Conversely, we can also apply the results of small shifts to big numbers.

\begin{example}\label{Ex:F_jump}
  Let $\seqx{F_n} = \Ux{1,-1}$ be the Fibonacci numbers, we have, for any $n$,
  \begin{align*}
    \gcd(F_{2n}+2,\ F_{2n+2}+4)   &= \GCDs[n-1]{\Wx{0,1}{3,1}}{2}{2};\\
    \gcd(F_{2n+1}+2,\ F_{2n+3}+4) &= \GCDs[n-1]{\Wx{1,2}{3,1}}{2}{2}.
  \end{align*}
\end{example}
\begin{proof}
  By \Cref{Thm:gcd_jump} with $\Vn[2]{1,-1} = L_2 = 3$ and $(-1)^2 = 1$, we have
  \[
    \gcd(F_{2n+r}+2,\ F_{2n+r+2}+4) = \GCDs{\Wx{F_r,F_{r+2}}{3,1}}{2}{4}.
  \]
  Then by \Cref{Thm:gcd_move_shift} with $\seqx{S_n} = \Wx{2,2}{3,1} = \seqx{2,2,4,10,26,\ldots}$, we get
  \[
    \GCDs{\Wx{F_r,F_{r+2}}{3,1}}{2}{4} = \GCDs[n-1]{\Wx{F_r,F_{r+2}}{3,1}}{2}{2}.
  \]
  Since $\seqx{F_n} = \seqx{0,1,1,2,3,5,8,\ldots}$, we can conclude the result.
\end{proof}

The result of \Cref{Ex:F_jump} shows that we can get the values of $\seqx{\gcd(F_{2n}+2,\ F_{2n+2}+4)}$ and $\seqx{\gcd(F_{2n+1}+2,\ F_{2n+3}+4)}$ by only computing the values of $\seqx{\GCDs{\Wx{0,1}{3,1}}{2}{2}}$ and $\seqx{\GCDs{\Wx{1,2}{3,1}}{2}{2}}$.



\section{Computing methods and unbounded cases}\label{sec:MethodsAndUnboundedCases}

\subsection{Chen's method}

The following lemma and theorem are inspired by Chen's work \cite[p.~3]{chen2011}, which is to turn the shift values $(s,t)$ into a sequence $\seqx{T_n}$ and then change the indices of $\seqx{T_n}$ and $\seqx{W_n}$ into some adjacent integers.
The following lemma use a fact \cite[Eq.~(2.17)]{horadam1965} that
\begin{equation}\label{negU}
  U_{-n} = -q^{-n} U_n.
\end{equation}

\begin{lemma}\label{Lem:negW}
  For any integers $a$, $b$, $p$, $q$, and $n$,
  \begin{equation}\label{LemEq:negW}
    \Wn[-n]{a,b}{p,q} = q^{-(n+1)} \Wn[n+1]{b,qa}{p,q}.
  \end{equation}
\end{lemma}
\begin{proof}
  By \eqref{Wn_to_Un} and \eqref{negU}, we get
  \begin{align*}
    \Wn[-n]{a,b}{p,q}
    &= bU_{-n} - aqU_{-n-1}\\
    &= -q^{-n}bU_n + q^{-n}aU_{n+1}\\
    &= q^{-(n+1)}(qaU_{n+1} - bqU_n).
  \end{align*}
  Using \eqref{Wn_to_Un} again, we obtain
  \[
    q^{-(n+1)}(qaU_{n+1} - bqU_n) = q^{-(n+1)}\Wn[n+1]{b,qa}{p,q}.
    \qedhere
  \]
\end{proof}

Next, we let $\seqx{T_n} = \Wx{t,qs}{p,q}$ denote the sequence generated by $t$ and $qs$, where $s$ and $t$ are the given shift values.
By \Cref{Lem:negW}, we have
\[
  S_{-n} = q^{-(n+1)} T_{n+1}.
\]

\begin{theorem}\label{Thm:gcd_WT}
  For any integers $s$, $t$, $n$, and $k$,
  \begin{equation}\label{LemEq:gcd_WT}
    \GCDs[n]{W}{s}{t} =
    \begin{cases}
      \gcd(W_{n-k} + T_{k+1},\ W_{n-k+1} + T_k), & \text{if $q = 1$;}\\
      \gcd(W_{n-k} + T_{k+1},\ W_{n-k+1} - T_k), & \text{if $q = -1$, $k$ odd;}\\
      \gcd(W_{n-k} - T_{k+1},\ W_{n-k+1} + T_k), & \text{if $q = -1$, $k$ even,}
    \end{cases}
  \end{equation}
  where $\seqx{T_n} = \Wx{t,qs}{p,q}$.
\end{theorem}
\begin{proof}
  By \Cref{Thm:gcd_move_shift}, we have
  \[
    \GCDs{W}{s}{t} = \GCDs[n-k]{W}{S_{-k}}{S_{-k+1}} = \gcd(W_{n-k} + S_{-k},\ W_{n-k+1} + S_{-k+1}).
  \]
  Since $S_{-n} = q^{-(n+1)}T_{n+1}$, we get
  \begin{align*}
    \MoveEqLeft \gcd(W_{n-k} + S_{-k},\ W_{n-k+1} + S_{-k+1})\\
    &= \gcd(W_{n-k} + q^{-(k+1)}T_{k+1},\ W_{n-k+1} + q^{-k}T_k)\\
    &=
    \begin{cases}
      \gcd(W_{n-k} + T_{k+1},\ W_{n-k+1} + T_k), & \text{if $q = 1$;}\\
      \gcd(W_{n-k} + T_{k+1},\ W_{n-k+1} - T_k), & \text{if $q = -1$, $k$ odd;}\\
      \gcd(W_{n-k} - T_{k+1},\ W_{n-k+1} + T_k), & \text{if $q = -1$, $k$ even.}
    \end{cases}
    \qedhere
  \end{align*}
\end{proof}

\Cref{Thm:gcd_WT} is useful for computing the values of $\GCDs{W}{s}{t}$ if we can somehow turn $\seqx{W_n}$ and $\seqx{T_n}$ into the same sequence or some related sequences.


\subsection{Conway's topograph}

If a sequence of numbers have a nonzero common multiple $m$, then the sequence is bounded by $|m|$.
Therefore, we see from \Cref{Thm:gcd_WS_pos_div} that $\seqx{\GCDs{\pW{W}}{s}{t}}$ is bounded if $\eValue(\pW{W})-\eValue(\pW{S}) \ne 0$.
And we see from \Cref{Thm:gcd_WS_neg_div} that $\seqx{\GCDs[2n-1]{\nW{W}}{s}{t}}$ and $\seqx{\GCDs[2n]{\nW{W}}{s}{t}}$ are bounded if $\eValue(\nW{W})+\eValue(\nW{S}) \ne 0$ and $\eValue(\nW{W})-\eValue(\nW{S}) \ne 0$, respectively.

We define the quadratic forms depending on $q = \pm 1$:
\[
  \pfun_p(x,y) = x^2-pxy+y^2, \text{ and } \nfun_p(x,y) = x^2+pxy-y^2.
\]
We see that $\pfun_p(s,t) = -\eValue(\pW{S})$ and $\nfun_p(s,t) = \eValue(\nW{S})$.
Thus, the sequence $\seqx{\GCDs{W}{s}{t}}$ is unbounded only when $(s,t)$ is a solution to the following equations:
\begin{equation}\label{UnboundEqs}
  \begin{cases}
    \pfun_p(x,y) = -\eValue(\pW{W}), & \text{for $\seqx{\GCDs{\pW{W}}{s}{t}}$;}\\
    \nfun_p(x,y) = \eValue(\nW{W}),  & \text{for the even part of $\seqx{\GCDs{\nW{W}}{s}{t}}$;}\\
    \nfun_p(x,y) = -\eValue(\nW{W}), & \text{for the odd part of $\seqx{\GCDs{\nW{W}}{s}{t}}$.}
  \end{cases}
\end{equation}

Conway \cite[Lecture~1]{conway1997} gave an algorithmic way to find all the values of any given quadratic form, which is by using the tree-like \emph{topograph} \cite[p.~6]{conway1997} to show the values of a quadratic form $f$.
The topograph starts from two linearly independent primitive vectors $\mathbf{e}_1$ and $\mathbf{e}_2$ (we usually choose $\mathbf{e}_1 = \cv{0}{1}$ and $\mathbf{e}_2 = \cv{1}{0}$).
Each region in the topograph corresponds to a \emph{lax vector} $\pm\mathbf{v}$ and the value of $f(\mathbf{v})$.
  (Since $f(\mathbf{v}) = f(-\mathbf{v})$ for any vector $\mathbf{v}$, we consider the pair $\pm\mathbf{v}$ as the same vector, which we call a lax vector \cite[p.~5]{conway1997}.)
\begin{figure}[H]
  \centering
  \includegraphics{./figures/figure-conway-1}
  \caption{The topograph which start from vectors $\mathbf{e}_1$ and $\mathbf{e}_2$.}
  \label{fig:topo_topo}
\end{figure}

Since the fact that $f(\mathbf{v}_1+\mathbf{v}_2) + f(\mathbf{v}_1-\mathbf{v}_2) = 2(f(\mathbf{v}_1) + f(\mathbf{v}_2))$ for any two vectors $\mathbf{v}_1$ and $\mathbf{v}_2$, the value of each region is easy to compute.
Conway also showed that the positive regions and the negative regions are separated by a connected path which we thicken in the topograph and call the \emph{river} \cite[p.~18]{conway1997}.
Moreover, for integer-valued forms, the surroundings of the river repeat periodically \cite[p.~20]{conway1997}.
In each topograph picture of this paper, we mark off one period with two red dots on the river, and write out the corresponding lax vector $\pm\cv{x}{y}$ and the value of $f(x,y)$ for each region.
\Cref{fig:topo_pos,fig:topo_neg} show Conway's topograph for the quadratic form $\pfun_p(x,y)$ and $\nfun_p(x,y)$, respectively.
\begin{figure}[H]
  \centering
  \includegraphics{./figures/figure-1}
  \caption{Conway's topograph for $\pfun_p(x,y)$, where $|p| > 2$, $\delta = \sign(p)$.}
  \label{fig:topo_pos}
\end{figure}
\begin{figure}[H]
  \centering
  \includegraphics{./figures/figure-2}
  \caption{Conway's topograph for $\nfun_p(x,y)$, where $p \neq 0$, $\delta = \sign(p)$.}
  \label{fig:topo_neg}
\end{figure}

By Conway's topograph, we can find the solutions $(s,t)$ to the equations \eqref{UnboundEqs}.
Moreover, if $\eValue(W)$ is not a square-free integer, that is, there is an integer $c$ such that $\eValue(W)/(c^2)$ is again an integer, then $(cs',ct')$ is also a solution to \eqref{UnboundEqs} where $(s',t')$ is a solution to $f_p(x,y) = \pm\eValue(W)/(c^2)$.

We see from \Cref{fig:topo_pos,fig:topo_neg} that the sequence of vectors $\seqx{\mathbf{E}_0, \mathbf{E}_1, \mathbf{E}_2, \mathbf{E}_3, \ldots}$ which contains $\cv{0}{1}$ and $\cv{1}{0}$ in \Cref{fig:topo_p} form a recurrence sequence $\Wx{\mathbf{E}_0, \mathbf{E}_1}{p, \pm 1}$.
Since $\mathbf{A}_n = \mathbf{E}_{n-1} \pm m\mathbf{E}_n$ for any $n$, the sequence $\seqx{\mathbf{A}_n}$ is also a recurrence sequence, and so are $\seqx{\mathbf{B}_n}$ and $\seqx{\mathbf{C}_n} = \seqx{\mathbf{A}_n \pm \mathbf{B}_n}$.
Therefore, for $q = 1$, all we need to find is the regions in just one period of the topograph.
For $q = -1$, we only need to find the regions in the positive half of one period.
That is, if $(s,t)$ is a solution we found in one (half-)period, then the corresponding solution in other (half-)periods must be one of $\pm(S_k,S_{k+1})$.
\begin{figure}[H]
  \centering
  \includegraphics{./figures/p-figure-1}
  \includegraphics{./figures/p-figure-2}
  \caption{Conway's topographs for $\pfun_p(x,y)$ (left) and $\nfun_p(x,y)$ (right).}
  \label{fig:topo_p}
\end{figure}

In the following example, we present how to find all $(s,t)$ such that $\seqx{\GCDs{W}{s}{t}}$ may be unbounded.
\begin{example}
  Let $\seqx{W_n} = \Wx{1,3}{4,-1}$.
  Thus, $\eValue(W) = 4$ and the corresponding quadratic form is $f(x,y) = x^2+4xy-y^2$.
  We use Conway's topograph to get \Cref{fig:topo_example}:  
  \begin{figure}[H]
    \centering
    \includegraphics{./figures/figure-3}
    \caption{Conway's topograph for $f(x,y) = x^2+4xy-y^2$.}
    \label{fig:topo_example}
  \end{figure}
    
  Since $\eValue(W) = 4 = 2^2$, we need to find all the vectors with the values of $f(x,y)$ being $\pm 1$ and $\pm 4$.
  So in \Cref{fig:topo_example}, the corresponding vectors in one half-period are $(1,0)$, $(1,1)$, $(1,3)$.
  We have to multiply $2$ back to the vector $(1,0)$ such that the value of $f(x,y)$ being $\pm 4$.
  These give three sequences: $\Wx{2,0}{4,-1}$, $\Wx{1,1}{4,-1}$, $\Wx{1,3}{4,-1}$.
  The sequence $\seqx{\GCDs{W}{s}{t}}$ is unbounded only when $(s,t) = \pm(S_k,S_{k+1})$ for some $k$ where $\seqx{S_n}$ is any one of these three sequences.
\end{example}


\subsection{Trivial unbounded cases}

According to \Cref{Thm:gcd_move_shift}, we do not really need to compute the whole solution set of $(s,t)$.
Instead, we can only consider some $(S_{n},S_{n+1})$ which are easier to compute.
Moreover, if $(s,t)$ is a solution of $f_p(x,y)$, then we can easily to prove that the only other solution with the same first term $s$ is $(s,sp-t)$.

However, if $\seqx{\pW{S}_n} = \Wx{s,sp-t}{p,1}$, then $\pW{S}_{-1}=t$.
Applying \Cref{Thm:gcd_move_shift}, we have
\begin{equation*}
  \GCDs{\pW{W}}{s}{sp-t}
   = \GCDs{\pW{W}}{\pW{S}_0}{\pW{S}_1}
   = \GCDs[n-1]{\pW{W}}{\pW{S}_{-1}}{\pW{S}_0}
   = \GCDs[n-1]{\pW{W}}{t}{s}.
\end{equation*}
Thus, we can compute $\seqx{\GCDs{\pW{W}}{\pm t}{\pm s}}$ instead of computing $\seqx{\GCDs{\pW{W}}{\pm s}{\pm(sp-t)}}$.

Similarly, we have $\GCDs[2n]{\nW{W}}{s}{sp-t} = \GCDs[2n-1]{\nW{W}}{-t}{s}$ and $\GCDs[2n-1]{\nW{W}}{t}{s+tp} = \GCDs[2n-2]{\nW{W}}{s}{t}$.
Thus, we can compute $\seqx{\GCDs[2n-1]{\nW{W}}{\mp t}{\pm s}}$ and $\seqx{\GCDs[2n]{\nW{W}}{\pm s}{\pm t}}$ instead of computing $\seqx{\GCDs[2n]{\nW{W}}{\pm s}{\pm(sp-t)}}$ and $\seqx{\GCDs[2n-1]{\nW{W}}{\pm t}{\pm(s+tp)}}$, respectively.

Now we combine all the above results together.
We indicate the trivial unbounded situations for the following three cases:
\begin{enumerate}
  \item
    Since $\pfun_p(a,b) = -\eValue(\pW{W})$, there are two trivial solutions $(a,b)$ and $(a,ap-b)$ to the equation $\pfun_p(x,y) = -\eValue(\pW{W})$.
    We compute $\GCDs{\pW{W}}{\pm a}{\pm b}$ and $\GCDs{\pW{W}}{\pm b}{\pm a}$ to tell that these values are unbounded.
  \item
    Since $\nfun_p(a,b) = \eValue(\nW{W})$, there are two trivial solutions $(a,b)$ and $(a,ap-b)$ to the equation $\nfun_p(x,y) = \eValue(\nW{W})$.
    We compute $\GCDs[2n]{\nW{W}}{\pm a}{\pm b}$ and $\GCDs[2n-1]{\nW{W}}{\mp b}{\pm a}$ to tell that these values are unbounded.
  \item
    Since $\nfun_p(b,-a) = -\eValue(\nW{W})$, there are two trivial solutions $(b,-a)$ and $(b,a+bp)$ to the equation $\nfun_p(x,y) = -\eValue(\nW{W})$.
    We compute $\GCDs[2n-1]{\nW{W}}{\pm b}{\mp a}$ and $\GCDs[2n]{\nW{W}}{\pm a}{\pm b}$ to tell that these values are unbounded.
\end{enumerate}



\section{Computations for trivial unbounded cases}\label{sec:ComputationsForUnboundedCases}

In the following propositions, we use \Cref{Thm:gcd_WT} to compute the actual values of $\seqx{\GCDs{{W}}{s}{t}}$ where $(s,t)$ is one of the above pairs $(\pm a,\pm b)$, $(\pm b,\pm a)$, and $(\mp b,\pm a)$.
As a result, these values are all unbounded.

\begin{proposition}\label{Thm:gcd_W_pos_ab}
  For any integer $n$,
  \begin{align}
  \label{ThmEq:gcd_W_pos_papb}
    \GCDs{\pW{W}}{a}{b} &=
    \begin{cases}
      \gcd(a+b,\ pa-2b) \abs{\pW{U}_m-\pW{U}_{m-1}}, & \text{if $n = 2m-1$;}\\
      \gcd(a, b) \abs{\pW{V}_m},                     & \text{if $n = 2m$.}
    \end{cases}\\
  \label{ThmEq:gcd_W_pos_nanb}
    \GCDs{\pW{W}}{-a}{-b} &=
    \begin{cases}
      \gcd(a-b,\ 2a-pb) \abs{\pW{U}_m+\pW{U}_{m-1}}, & \text{if $n = 2m-1$;}\\
      \gcd(2b-pa,\ pb-2a) \abs{\pW{U}_m},            & \text{if $n = 2m$.}
    \end{cases}
  \end{align}
\end{proposition}
\begin{proof}
  By \eqref{Wn_to_Un} and \eqref{LemEq:gcd_WT} with $q=1$, $\seqx{\pW{T}_n} = \Wx{b,a}{p,1}$, and $k=n$, we get
  \begin{align*}
    \MoveEqLeft \GCDs[2n-1]{\pW{W}}{a}{b}
       = \gcd(\pW{W}_{n-1} + \pW{T}_{n+1},\ \pW{W}_n + \pW{T}_n)\\
      &= \gcd(b\pW{U}_{n-1} - a\pW{U}_{n-2} + a\pW{U}_{n+1} - b\pW{U}_n,\  b\pW{U}_n - a\pW{U}_{n-1} + a\pW{U}_n - b\pW{U}_{n-1})\\
      &= \gcd((a+pa-b)(\pW{U}_n - \pW{U}_{n-1}),\ (a+b)(\pW{U}_n - \pW{U}_{n-1}))\\
      &= \gcd(a+b,\ pa-2b) \abs{\pW{U}_n - \pW{U}_{n-1}},\\
    \MoveEqLeft \GCDs[2n]{\pW{W}}{a}{b}
       = \gcd(\pW{W}_n + \pW{T}_{n+1},\ \pW{W}_{n+1} + \pW{T}_n)\\
      &= \gcd(b\pW{U}_n - a\pW{U}_{n-1} + a\pW{U}_{n+1} - b\pW{U}_n,\ b\pW{U}_{n+1} - a\pW{U}_n + a\pW{U}_n - b\pW{U}_{n-1})\\
      &= \gcd(a(p\pW{U}_n - 2\pW{U}_{n-1}),\ b(p\pW{U}_n - 2\pW{U}_{n-1}))\\
      &= \gcd(a, b) \abs{\pW{V}_n}.
  \end{align*}
  By \eqref{Wn_to_Un} and \eqref{LemEq:gcd_WT} with $q=1$, $\seqx{\pW{T}_n} = \Wx{-b,-a}{p,1}$, and $k=n$, we get
  \begin{align*}
    \MoveEqLeft \GCDs[2n-1]{\pW{W}}{-a}{-b}
       = \gcd(\pW{W}_{n-1} + \pW{T}_{n+1},\ \pW{W}_n + \pW{T}_n)\\
      &= \gcd(b\pW{U}_{n-1} - a\pW{U}_{n-2} - a\pW{U}_{n+1} + b\pW{U}_n,\ b\pW{U}_n - a\pW{U}_{n-1} - a\pW{U}_n + b\pW{U}_{n-1})\\
      &= \gcd((a-pa+b)(\pW{U}_n + \pW{U}_{n-1}),\ (-a+b)(\pW{U}_n + \pW{U}_{n-1})),\\
      &= \gcd(a-b,\ 2a-pb) \abs{\pW{U}_n + \pW{U}_{n-1}},\\
    \MoveEqLeft \GCDs[2n]{\pW{W}}{-a}{-b}
       = \gcd(\pW{W}_n + \pW{T}_{n+1},\ \pW{W}_{n+1} + \pW{T}_n)\\
      &= \gcd(b\pW{U}_n - a\pW{U}_{n-1} - a\pW{U}_{n+1} + b\pW{U}_n,\ b\pW{U}_{n+1} - a\pW{U}_n - a\pW{U}_n + b\pW{U}_{n-1})\\
      &= \gcd((2b-pa)\pW{U}_n,\ (pb-2a)\pW{U}_n)\\
      &= \gcd(2b-pa,\ pb-2a) \abs{\pW{U}_n}.
    \qedhere
  \end{align*}
\end{proof}

\begin{proposition}\label{Thm:gcd_W_pos_ba}
  For any integer $n$,
  \begin{align}
  \label{ThmEq:gcd_W_pos_pbpa}
    \GCDs{\pW{W}}{b}{a} &=
    \begin{cases}
      \gcd(2,p) \abs{\pW{W}_m},      & \text{if $n = 2m-1$;}\\
      \abs{\pW{W}_m + \pW{W}_{m-1}}, & \text{if $n = 2m-2$.}
    \end{cases}\\
  \label{ThmEq:gcd_W_pos_nbna}
    \GCDs{\pW{W}}{-b}{-a} &=
    \begin{cases}
      \abs{p\pW{W}_m - 2\pW{W}_{m-1}}, & \text{if $n = 2m-1$;}\\
      \abs{\pW{W}_m - \pW{W}_{m-1}},   & \text{if $n = 2m-2$.}
    \end{cases}
  \end{align}
\end{proposition}
\begin{proof}
  By \eqref{LemEq:gcd_WT} with $q=1$, $\seqx{\pW{T}_n}=\Wx{a,b}{p,1}=\seqx{\pW{W}_n}$, and $k=n$, we get
  \begin{align*}
    \GCDs[2n-1]{\pW{W}}{b}{a}
      &= \gcd(\pW{W}_{n-1} + \pW{T}_{n+1},\ \pW{W}_n + \pW{T}_n)\\
      &= \gcd(p\pW{W}_n,\ 2\pW{W}_n)
       = \gcd(2,p) \abs{\pW{W}_n},\\
    \GCDs[2n-2]{\pW{W}}{b}{a}
      &= \gcd(\pW{W}_{n-2} + \pW{T}_{n+1},\ \pW{W}_{n-1} + \pW{T}_n)\\
      &= \gcd(0,\ \pW{W}_n + \pW{W}_{n-1})
       = \abs{\pW{W}_n + \pW{W}_{n-1}}.
  \end{align*}
  By \eqref{LemEq:gcd_WT} with $q=1$, $\seqx{\pW{T}_n}=\Wx{-a,-b}{p,1}=\seqx{-\pW{W}_n}$, and $k = n$, we get
  \begin{align*}
    \GCDs[2n-1]{\pW{W}}{-b}{-a}
      &= \gcd(\pW{W}_{n-1} + \pW{T}_{n+1},\ \pW{W}_n + \pW{T}_n)\\
      &= \gcd(-p\pW{W}_n + 2\pW{W}_{n-1},\ 0)
       = \abs{p\pW{W}_n - 2\pW{W}_{n-1}},\\
    \GCDs[2n-2]{\pW{W}}{-b}{-a}
      &= \gcd(\pW{W}_{n-2} + \pW{T}_{n+1},\ \pW{W}_{n-1} + \pW{T}_n)\\
      &= \gcd(0,\ \pW{W}_n - \pW{W}_{n-1})
       = \abs{\pW{W}_n - \pW{W}_{n-1}}.
    \qedhere
  \end{align*}
\end{proof}

\begin{example}[{\cite[Thm.~3.1]{ray2017}}]
  Let $\seqx{B_n} = \Ux{6,1} = \seqx{0,1,6,35,204,\ldots}$ be the balancing numbers.
  We see that $\eValue(B) - \eValue(S) = 0$ where $\seqx{S_n} = \Wx{-1,-6}{6,1}$.
  By \Cref{Thm:gcd_move_shift} and \eqref{ThmEq:gcd_W_pos_nanb}, we have
  \begin{equation*}
    \GCDs{B}{-1}{-6} = \GCDs[n-1]{B}{0}{-1} =
    \begin{cases}
      B_m + B_{m-1}, & \text{if $n = 2m$;}\\
      2 B_m,         & \text{if $n = 2m+1$.}
    \end{cases}
  \end{equation*}
\end{example}

\begin{proposition}\label{Thm:gcd_W_neg_ab}
  For any integer $n$,
  \begin{align}
  \label{ThmEq:gcd_W_neg_papb}
    \GCDs[2n]{\nW{W}}{a}{b} &=
    \begin{cases}
      \gcd(2a+pb,\ pa-2b) \abs{\nW{U}_n}, & \text{if $n$ odd;}\\
      \gcd(a,b) \abs{\nW{V}_n},           & \text{if $n$ even.}
    \end{cases}\\
  \label{ThmEq:gcd_W_neg_nanb}
    \GCDs[2n]{\nW{W}}{-a}{-b} &=
    \begin{cases}
      \gcd(a, b) \abs{\nW{V}_n},          & \text{if $n$ odd;}\\
      \gcd(2a+pb,\ pa-2b) \abs{\nW{U}_n}, & \text{if $n$ even.}
    \end{cases}
  \end{align}
\end{proposition}
\begin{proof}
  By \eqref{Wn_to_Un} and \eqref{LemEq:gcd_WT} with $q=-1$, $\seqx{\nW{T}_n}=\Wx{b,-a}{p,-1}$, and $k=n$, we get
  \begin{align*}
    \MoveEqLeft \GCDs[4n-2]{\nW{W}}{a}{b}
       = \gcd(\nW{W}_{2n-2} - \nW{T}_{2n+1},\ \nW{W}_{2n-1} + \nW{T}_{2n})\\
      &= \gcd(b\nW{U}_{2n-2} + a\nW{U}_{2n-3} + a\nW{U}_{2n+1} - b\nW{U}_{2n},\ b\nW{U}_{2n-1} + a\nW{U}_{2n-2} - a\nW{U}_{2n} + b\nW{U}_{2n-1})\\
      &= \gcd((p^2a+2a-pb)\nW{U}_{2n-1},\ (-pa+2b)\nW{U}_{2n-1})\\
      &= \gcd(2a+pb,\ pa-2b) \abs{\nW{U}_{2n-1}},\\
    \MoveEqLeft \GCDs[4n]{\nW{W}}{a}{b}
       = \gcd(\nW{W}_{2n} - \nW{T}_{2n+1},\ \nW{W}_{2n+1} + \nW{T}_{2n})\\
      &= \gcd(b\nW{U}_{2n} + a\nW{U}_{2n-1} + a\nW{U}_{2n+1} - b\nW{U}_{2n},\ b\nW{U}_{2n+1} + a\nW{U}_{2n} - a\nW{U}_{2n} + b\nW{U}_{2n-1})\\
      &= \gcd(a(p\nW{U}_{2n} + 2\nW{U}_{2n-1}),\ b(p\nW{U}_{2n} + 2\nW{U}_{2n-1}))\\
      &= \gcd(a,b) \abs{\nW{V}_{2n}}.
  \end{align*}
  By \eqref{Wn_to_Un} and \eqref{LemEq:gcd_WT} with $q=-1$, $\seqx{\nW{T}_n}=\Wx{-b,a}{p,-1}$, and $k=n$, we get
  \begin{align*}
    \MoveEqLeft \GCDs[4n-2]{\nW{W}}{-a}{-b}
       = \gcd(\nW{W}_{2n-2} - \nW{T}_{2n+1},\ \nW{W}_{2n-1} + \nW{T}_{2n})\\
      &= \gcd(b\nW{U}_{2n-2} + a\nW{U}_{2n-3} - a\nW{U}_{2n+1} + b\nW{U}_{2n},\ b\nW{U}_{2n-1} + a\nW{U}_{2n-2} + a\nW{U}_{2n} - b\nW{U}_{2n-1})\\
      &= \gcd((-pa+b)(pU_{2n-1} + 2U_{2n-2}),\ a(pU_{2n-1} + 2U_{2n-2})),\\
      &= \gcd(a, b) \abs{\nW{V}_{2n-1}},\\
    \MoveEqLeft \GCDs[4n]{\nW{W}}{-a}{-b}
       = \gcd(\nW{W}_{2n} - \nW{T}_{2n+1},\ \nW{W}_{2n+1} + \nW{T}_{2n})\\
      &= \gcd(b\nW{U}_{2n} + a\nW{U}_{2n-1} - a\nW{U}_{2n+1} + b\nW{U}_{2n},\ b\nW{U}_{2n+1} + a\nW{U}_{2n} + a\nW{U}_{2n} - b\nW{U}_{2n-1})\\
      &= \gcd((-pa+2b)\nW{U}_{2n},\ (2a+pb)\nW{U}_{2n})\\
      &= \gcd(2a+pb,\ pa-2b) \abs{\nW{U}_{2n}}.
    \qedhere
  \end{align*}
\end{proof}

\begin{proposition}\label{Thm:gcd_W_neg_ba}
  For any integer $n$,
  \begin{align}
  \label{ThmEq:gcd_W_neg_nbpa}
    \GCDs[2n-1]{\nW{W}}{-b}{a} &=
    \begin{cases}
      \gcd(2,p) \abs{\nW{W}_n},        & \text{if $n$ even;}\\
      \abs{p\nW{W}_n + 2\nW{W}_{n-1}}, & \text{if $n$ odd.}
    \end{cases}\\
  \label{ThmEq:gcd_W_neg_pbna}
    \GCDs[2n-1]{\nW{W}}{b}{-a} &=
    \begin{cases}
      \abs{p\nW{W}_n + 2\nW{W}_{n-1}}, & \text{if $n$ even;}\\
      \gcd(2,p) \abs{\nW{W}_n},        & \text{if $n$ odd.}
    \end{cases}
  \end{align}
\end{proposition}
\begin{proof}
  By \eqref{LemEq:gcd_WT} with $q=-1$, $\seqx{\nW{T}_n}=\Wn{a,b}{p,-1}=\seqx{\nW{W}_n}$, and $k=n$, we get
  \begin{align*}
    \GCDs[4n-1]{\nW{W}}{-b}{a}
      &= \gcd(\nW{W}_{2n-1} - \nW{T}_{2n+1},\ \nW{W}_{2n} + \nW{T}_{2n})\\
      &= \gcd(-p\nW{W}_{2n},\ 2\nW{W}_{2n})
       = \gcd(2,p) \abs{\nW{W}_{2n}},\\
    \GCDs[4n+1]{\nW{W}}{-b}{a}
      &= \gcd(\nW{W}_{2n+1} - \nW{T}_{2n+1},\ \nW{W}_{2n+2} + \nW{T}_{2n})\\
      &= \gcd(0,\ p\nW{W}_{2n+1} + 2\nW{W}_{2n})
       = \abs{p\nW{W}_{2n+1} + 2\nW{W}_{2n}}.
  \end{align*}
  By \eqref{LemEq:gcd_WT} with $q=-1$, $\seqx{\nW{T}_n}=\Wx{-a,-b}{p,-1}=\seqx{-\nW{W}_n}$, and $k = n$, we get
  \begin{align*}
    \GCDs[4n-1]{\nW{W}}{b}{-a}
      &= \gcd(\nW{W}_{2n-1} - \nW{T}_{2n+1},\ \nW{W}_{2n} + \nW{T}_{2n})\\
      &= \gcd(p\nW{W}_{2n} + 2\nW{W}_{2n-1},\ 0)
       = \abs{p\nW{W}_{2n} + 2\nW{W}_{2n-1}},\\
    \GCDs[4n+1]{\nW{W}}{b}{-a}
      &= \gcd(\nW{W}_{2n+1} - \nW{T}_{2n+1},\ \nW{W}_{2n+2} + \nW{T}_{2n})\\
      &= \gcd(2\nW{W}_{2n+1},\ p\nW{W}_{2n+1})
       = \gcd(2,p) \abs{\nW{W}_{2n+1}}.
    \qedhere
  \end{align*}
\end{proof}

\begin{example}[{\cite[Thm.~3]{chen2011}}]
  Let $\seqx{F_n} = \Ux{1,-1}$ be the Fibonacci numbers, and let $\seqx{L_n} = \Vx{1,-1}$ be the Lucas numbers.
  We see that $\eValue(F) + \eValue(S) = 0$ where $\seqx{S_n} = \Wx{1,1}{1,-1}$.
  By \Cref{Thm:gcd_move_shift} and \eqref{ThmEq:gcd_W_neg_papb}, we have
  \begin{equation*}
    \GCDs[2n-1]{F}{1}{1} = \GCDs[2n-2]{F}{0}{1} =
    \begin{cases}
      F_{2m-1}, & \text{if $n = 2m$;}\\
      L_{2m},   & \text{if $n = 2m+1$.}
    \end{cases}
  \end{equation*}
\end{example}



\section{Examples}\label{sec:Examples}

There are some results for some well-known sequences of numbers, such as
  the results of shifted Fibonacci numbers provided by Chen \cite{chen2011}, Dudley and Tucker \cite{dudley1971}, Rahn and Kreh \cite{rahn2018},
  the results of shifted Pell numbers provided by Koken and Arslan \cite{koken2018},
  and the results of shifted balancing numbers provided by Ray and Pradhan \cite{ray2017}.
We list those gcds and their periods $\omega_{\mathrm{even}}$ and $\omega_{\mathrm{odd}}$ for the even and odd part respectively below if they are bounded.
  (That is, for any integer $n$, $\GCDs[n]{W}{s}{t} = \GCDs[n+2\omega]{W}{s}{t}$.)
\begin{table}[H]
  \centering
  \begin{tabular}{ l | r r | r r | r r | l }
    $\GCDs{W}{s}{t}$          & $p$ & $q$ & $\eValue(W)$ & $\eValue(S)$ & $\omega_{\mathrm{odd}}$ & $\omega_{\mathrm{even}}$ & references\\
    \hline
    $\GCDs{F}{1}{-1}$         & $1$ & $-1$ & $-1$ & $-1$ &  $3$ &    - & \cite{dudley1971}\\
    $\GCDs{F}{\pm 1}{\pm 1}$  & $1$ & $-1$ & $-1$ &  $1$ &    - &  $3$ & \cite{dudley1971} and \cite[Thm.~3, 5]{chen2011}\\
    $\GCDs{F}{\pm 2}{\pm 2}$  & $1$ & $-1$ & $-1$ &  $4$ &  $4$ & $10$ & \cite[Thm.~4, 6]{chen2011}\\
    $\GCDs{F}{\pm 3}{\pm 3}$  & $1$ & $-1$ & $-1$ &  $9$ &  $6$ & $30$ & \cite[Thm.~1, 2]{rahn2018}\\
    $\GCDs{L}{1}{1}$          & $1$ & $-1$ &  $5$ &  $1$ & $12$ &  $3$ & \cite[Thm.~7]{chen2011}\\
    \hline
    $\GCDs{P}{\pm 2}{\mp 1}$  & $2$ & $-1$ & $-1$ & $-1$ &  $1$ &    - & \cite[Thm.~1, 4]{koken2018}\\
    $\GCDs{P}{\pm 1}{\mp 2}$  & $2$ & $-1$ & $-1$ & $-7$ &  $2$ &  $4$ & \cite[Thm.~1, 4]{koken2018}\\
    $\GCDs{Q}{\pm 6}{\mp 2}$  & $2$ & $-1$ &  $8$ &  $8$ &  $1$ &    - & \cite[Thm.~7, 9]{koken2018}\\
    $\GCDs{Q}{\pm 2}{\mp 6}$  & $2$ & $-1$ &  $8$ & $56$ &  $4$ &  $2$ & \cite[Thm.~7, 9]{koken2018}\\
    \hline
    $\GCDs{B}{\pm 1}{\pm 6}$  & $6$ &  $1$ & $-1$ & $-1$ &    - &    - & \cite[Thm.~3.1, 3.3]{ray2017}\\
    $\GCDs{B}{\pm 2}{\pm 12}$ & $6$ &  $1$ & $-1$ & $-4$ &  $2$ &  $1$ & \cite[Thm.~3.2, 3.4]{ray2017}\\
    $\GCDs{C}{1}{3}$          & $6$ &  $1$ &  $8$ &  $8$ &    - &    - & \cite[Thm.~3.5]{ray2017}
  \end{tabular}
  \caption{Some known results for $\GCDs{W}{s}{t}$.}
\end{table}

In the following, we show some examples using our results. In the first example, we present the process in detail.

\begin{example}\label{Ex:L_2_1}
  We let $\seqx{F_n}$ denote the Fibonacci numbers, and let $\seqx{L_n}$ denote the Lucas numbers.
  For any integer $n$,
  \begin{align*}
    \GCDs{L}{2}{1} &=
    \begin{cases}
      5F_{n/2}, & \text{if $n \equiv 2$ (mod $4$);}\\
      L_{n/2},  & \text{if $n \equiv 0$ (mod $4$);}\\
      2,        & \text{if $n \equiv 3$ (mod $6$);}\\
      1,        & \text{otherwise.}
    \end{cases}
    &
    \GCDs{L}{-2}{-1} &=
    \begin{cases}
      L_{n/2},  & \text{if $n \equiv 2$ (mod $4$);}\\
      5F_{n/2}, & \text{if $n \equiv 0$ (mod $4$);}\\
      2,        & \text{if $n \equiv 3$ (mod $6$);}\\
      1,        & \text{otherwise.}
    \end{cases}
  \end{align*}
\end{example}
\begin{proof}
  Since $\seqx{S_n} = \pm\Wx{2,1}{1,-1} = \seqx{\pm L_n}$, by \Cref{Thm:gcd_WS_neg_div} with $\eValue(L) = \eValue(S) = 5$, we get $\GCDs[2n-1]{L}{\pm 2}{\pm 1}$ divides $\eValue(L) + \eValue(S) = 10 \ne 0$.
  Thus, by \Cref{Thm:periodic}, since $L_{12} \equiv 2$, $L_{13} \equiv 1$ (mod $10$), we can choose the period $\omega = 12$.
  \[
    \begin{array}{ l || *{12}{r} | *{2}{r} }
      n            & 0 & 1 & 2 & 3 & 4 &  5 &  6 &  7 &  8 &  9 &  10 &  11 &  12 &  13\\
      \hline
      L_n          & 2 & 1 & 3 & 4 & 7 & 11 & 18 & 29 & 47 & 76 & 123 & 199 & 322 & 521\\
      L_n \bmod 10 & 2 & 1 & 3 & 4 & 7 &  1 &  8 &  9 &  7 &  6 &   3 &   9 &   2 &   1
    \end{array}
  \]
  Then we get the values of $\seqx{\GCDs{L}{\pm 2}{\pm 1}}$ for all odd $n$ while they are bounded.
  \[
    \begin{array}{ l || *{6}{r} | r }
      n                & 1 & 3 & 5 & 7 & 9 & 11 & 13\\
      \hline
      \GCDs{L}{2}{1}   & 1 & 2 & 1 & 1 & 2 &  1 &  1\\
      \GCDs{L}{-2}{-1} & 1 & 2 & 1 & 1 & 2 &  1 &  1
    \end{array}
  \]
  On the other hand, $\eValue(L) - \eValue(S) = 0$.
  By \Cref{Thm:gcd_W_neg_ab}, $\seqx{\GCDs[2n]{L}{\pm 2}{\pm 1}}$ is unbounded, and
  \begin{align*}
    \GCDs[2n]{L}{2}{1} &=
    \begin{cases}
      \gcd(5,0) F_n, & \text{if $n$ odd;}\\
      \gcd(2,1) L_n, & \text{if $n$ even.}
    \end{cases}
    &
    \GCDs[2n]{L}{-2}{-1} &=
    \begin{cases}
      \gcd(2,1) L_n, & \text{if $n$ odd;}\\
      \gcd(5,0) F_n, & \text{if $n$ even.}
    \end{cases}
  \end{align*}
  Thus, we get the values of $\seqx{\GCDs{L}{\pm 2}{\pm 1}}$ for all even $n$ while they are unbounded.
  \[
    \begin{array}[b]{ l || *{7}{r} }
      n                & 0 & 2 & 4 &  6 &  8 & 10 & 12\\
      \hline
      \GCDs{L}{2}{1}   & 2 & 5 & 3 & 10 &  7 & 25 & 18\\
      \GCDs{L}{-2}{-1} & 0 & 1 & 5 &  4 & 15 & 11 & 40
    \end{array}
    \qquad
    \begin{array}[b]{ l || *{7}{r} }
      n                & 0 & 2 & 4 &  6 &  8 & 10 & 12\\
      \hline
      5F_{n/2}         & 0 & 5 & 5 & 10 & 15 & 25 & 40\\
      L_{n/2}          & 2 & 1 & 3 &  4 &  7 & 11 & 18
    \end{array}
    \qedhere
  \]
\end{proof}

We can use \Cref{Thm:periodic,Thm:gcd_W_neg_ba} to get the values of $\seqx{\GCDs{L}{\mp 1}{\pm 2}}$ for both bounded and unbounded parts.
However, we can also use \Cref{Thm:gcd_move_shift} to get the values since $L_{-1} = -1$, for example, (in fact \cite[Eq.~(2.16)]{horadam1965}, $V_{-n} = q^{-n}V_n$)
\[
  \GCDs{L}{-1}{2} = \GCDs[n+1]{L}{2}{1}, \qquad \GCDs{L}{1}{-2} = \GCDs[n+1]{L}{-2}{-1}.
\]

We let $\seqx{P_n}$ denote the Pell numbers defined by $\seqx{P_n} = \Ux{2,-1} = \Wx{0,1}{2,-1}$, and let $\seqx{Q_n}$ denote the Pell-Lucas numbers defined by $\seqx{Q_n} = \Vx{2,-1} = \Wx{2,2}{2,-1}$.

\begin{example}[{\cite[Thm.~1,\ 4]{koken2018}}]\label{Ex:P_0_1}
  For any integer $n$,
  \begin{align*}
    \GCDs{P}{0}{1} &=
    \begin{cases}
      2P_{n/2}, & \text{if $n \equiv 2$ (mod $4$);}\\
      Q_{n/2},  & \text{if $n \equiv 0$ (mod $4$);}\\
      1,        & \text{otherwise.}
    \end{cases}
    &
    \GCDs{P}{0}{-1} &=
    \begin{cases}
      Q_{n/2},  & \text{if $n \equiv 2$ (mod $4$);}\\
      2P_{n/2}, & \text{if $n \equiv 0$ (mod $4$);}\\
      1,        & \text{otherwise.}
    \end{cases}
  \end{align*}
\end{example}
\begin{proof}
  Since $\seqx{S_n} = \pm\Wx{0,1}{2,-1} = \seqx{\pm P_n}$, by \Cref{Thm:gcd_WS_neg_div} with $\eValue(P) = \eValue(S) = -1$, we get $\GCDs[2n-1]{P}{0}{\pm 1}$ divides $\eValue(P) + \eValue(S) = 2$.
  Thus, by \Cref{Thm:periodic}, since $P_2 \equiv 0$, $P_3 \equiv 1$ (mod $2$), we choose the period $\omega = 2$.
  Then we can get the values of $\seqx{\GCDs{P}{0}{\pm 1}}$ for all odd $n$ while they are bounded.
  \[
    \begin{array}[t]{ l || *{2}{r} | *{2}{r} | *{2}{r} }
      n               & 0 & 1 & 2 & 3 & 4 & 5\\
      \hline
      P_n \bmod 2     & 0 & 1 & 0 & 1 & 0 & 1\\
      \GCDs{P}{0}{1}  &   & 1 &   & 1 &   & 1\\
      \GCDs{P}{0}{-1} &   & 1 &   & 1 &   & 1
    \end{array}
    \qquad
    \begin{array}[t]{ l || *{6}{r} }
      n               & 0 & 2 & 4 &  6 &  8\\
      \hline
      \GCDs{P}{0}{1}  & 2 & 2 & 6 & 10 & 34\\
      \GCDs{P}{0}{-1} & 0 & 2 & 4 & 14 & 24\\
      \hline
      2P_{n/2}        & 0 & 2 & 4 & 10 & 24\\
      Q_{n/2}         & 2 & 2 & 6 & 14 & 34
    \end{array}
  \]
  And by \Cref{Thm:gcd_W_neg_ab}, we get the values of the unbounded part of $\seqx{\GCDs{P}{0}{\pm 1}}$.
\end{proof}

We can use \Cref{Thm:gcd_move_shift} to get the values of $\GCDs{P}{\pm 1}{0}$ since $P_{-1} = 1$, for example, (in fact \cite[Eq.~(2.17)]{horadam1965}, $U_{-n} = -q^{-n}U_n$)
\[
  \GCDs{P}{1}{0} = \GCDs[n+1]{P}{0}{1}, \qquad \GCDs{P}{-1}{0} = \GCDs[n+1]{P}{0}{-1}.
\]

\begin{example}\label{Ex:P_1_1}
  For any integer $n$,
  \begin{align*}
    \GCDs{P}{1}{1} &=
    \begin{cases}
      3, & \text{if $n \equiv 2$ (mod $8$);}\\
      1, & \text{otherwise.}
    \end{cases}
    &
    \GCDs{P}{-1}{-1} &=
    \begin{cases}
      3, & \text{if $n \equiv 6$ (mod $8$);}\\
      1, & \text{otherwise.}
    \end{cases}
  \end{align*}
\end{example}
\begin{proof}
  Since $\seqx{S_n} = \pm\Wx{1,1}{2,-1}$, by \Cref{Thm:gcd_WS_neg_div} with $\eValue(P) = -1$ and $\eValue(S) = 2$, we get $\GCDs[2n-1]{P}{\pm 1}{\pm 1}$ divides $\eValue(P) + \eValue(S) = 1$ and $\GCDs[2n]{P}{\pm 1}{\pm 1}$ divides $\eValue(P) - \eValue(S) = 3$, so that $\GCDs{P}{\pm 1}{\pm 1}$ divides $3$.
  Thus, by \Cref{Thm:periodic}, since $P_8 \equiv 0$, $P_9 \equiv 1$ (mod $3$), we choose the period $\omega = 8$.
  Then we can get the results.
  \[
    \begin{array}[b]{ l || *{8}{r} | *{2}{r} }
      n                & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\
      \hline
      P_n \bmod 3      & 0 & 1 & 2 & 2 & 0 & 2 & 1 & 1 & 0 & 1\\
      \GCDs{P}{1}{1}   & 1 & 1 & 3 & 1 & 1 & 1 & 1 & 1 & 1 & 1\\
      \GCDs{P}{-1}{-1} & 1 & 1 & 1 & 1 & 1 & 1 & 3 & 1 & 1 & 1
    \end{array}
    \qedhere
  \]
\end{proof}

\begin{example}\label{Ex:Q_1_1}
  For any integer $n$,
  \begin{align*}
    \GCDs{Q}{1}{1} &=
    \begin{cases}
      5, & \text{if $n \equiv 3$ (mod $12$);}\\
      3, & \text{if $n \equiv 0$ (mod $8$);}\\
      1, & \text{otherwise.}
    \end{cases}
    &
    \GCDs{Q}{-1}{-1} &=
    \begin{cases}
      5, & \text{if $n \equiv 9$ (mod $12$);}\\
      3, & \text{if $n \equiv 4$ (mod $8$);}\\
      1, & \text{otherwise.}
    \end{cases}
  \end{align*}
\end{example}
\begin{proof}
  Since $\seqx{S_n} = \pm\Wx{1,1}{2,-1}$, by \Cref{Thm:gcd_WS_neg_div} with $\eValue(Q) = 8$ and $\eValue(S) = 2$, we get $\GCDs[2n-1]{Q}{\pm 1}{\pm 1}$ divides $\eValue(Q) + \eValue(S) = 10$ and $\GCDs[2n]{Q}{\pm 1}{\pm 1}$ divides $\eValue(Q) - \eValue(S) = 6$, so that $\GCDs{Q}{\pm 1}{\pm 1}$ divides $30$.
  Thus, by \Cref{Thm:periodic}, since $Q_{24} \equiv 2$, $Q_{25} \equiv 2$ (mod $30$), we choose the period $\omega = 24$.
  Then we can get the results.
  \[
    \begin{array}[b]{ l || *{12}{r} }
      n                &  0 &  1 &  2 &  3 &  4 &  5 &  6 &  7 &  8 &  9 & 10 & 11\\
      \hline
      Q_n \bmod 30     &  2 &  2 &  6 & 14 &  4 & 22 & 18 & 28 & 14 & 26 &  6 &  8\\
      \GCDs{Q}{1}{1}   &  3 &  1 &  1 &  5 &  1 &  1 &  1 &  1 &  3 &  1 &  1 &  1\\
      \GCDs{Q}{-1}{-1} &  1 &  1 &  1 &  1 &  3 &  1 &  1 &  1 &  1 &  5 &  1 &  1\\
      \hline\hline
      n                & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23\\
      \hline
      Q_n \bmod 30     & 22 & 22 &  6 &  4 & 14 &  2 & 18 &  8 &  4 & 16 &  6 & 28\\
      \GCDs{Q}{1}{1}   &  1 &  1 &  1 &  5 &  3 &  1 &  1 &  1 &  1 &  1 &  1 &  1\\
      \GCDs{Q}{-1}{-1} &  3 &  1 &  1 &  1 &  1 &  1 &  1 &  1 &  3 &  5 &  1 &  1
    \end{array}
    \begin{array}[b]{ | *{2}{r} }
      \hline\hline
      24 & 25\\
      \hline
       2 &  2\\
       3 &  1\\
       1 &  1
    \end{array}
    \qedhere
  \]
\end{proof}

\begin{example}[{\cite[Thm.~7,\ 9]{koken2018}}]\label{Ex:Q_2_2}
  For any integer $n$,
  \begin{align*}
    \GCDs{Q}{2}{2} &=
    \begin{cases}
      8P_{n/2}, & \text{if $n \equiv 2$ (mod $4$);}\\
      2Q_{n/2}, & \text{if $n \equiv 0$ (mod $4$);}\\
      4,        & \text{otherwise.}
    \end{cases}
    &
    \GCDs{Q}{-2}{-2} &=
    \begin{cases}
      2Q_{n/2}, & \text{if $n \equiv 2$ (mod $4$);}\\
      8P_{n/2}, & \text{if $n \equiv 0$ (mod $4$);}\\
      4,        & \text{otherwise.}
    \end{cases}
  \end{align*}
\end{example}
\begin{proof}
  Since $\seqx{S_n} = \pm\Wx{2,2}{2,-1} = \seqx{\pm Q_n}$, By \Cref{Thm:gcd_WS_neg_div} with $\eValue(Q) = \eValue(S) = 8$, we get $\GCDs[2n-1]{Q}{\pm 2}{\pm 2}$ divides $\eValue(Q) + \eValue(S) = 16$.
  Thus, by \Cref{Thm:periodic}, since $Q_4 \equiv 2$, $Q_5 \equiv 2$ (mod $16$), we choose the period $\omega = 4$.
  Then we can get the values of $\seqx{\GCDs{Q}{\pm 2}{\pm 2}}$ for all odd $n$ while they are bounded.
  \[
    \begin{array}[t]{ l || *{4}{r} | *{2}{r} }
      n                & 0 & 1 & 2 &  3 & 4 & 5\\
      \hline
      Q_n \bmod 16     & 2 & 2 & 6 & 14 & 2 & 2\\
      \GCDs{Q}{2}{2}   &   & 4 &   &  4 &   & 4\\
      \GCDs{Q}{-2}{-2} &   & 4 &   &  4 &   & 4
    \end{array}
    \qquad
    \begin{array}[t]{ l || *{6}{r} }
      n                & 0 & 2 &  4 &  6 &  8\\
      \hline
      \GCDs{Q}{2}{2}   & 4 & 8 & 12 & 40 & 68\\
      \GCDs{Q}{-2}{-2} & 0 & 4 & 16 & 28 & 96\\
      \hline
      8P_{n/2}         & 0 & 8 & 16 & 40 & 96\\
      Q_{n/2}          & 4 & 4 & 12 & 28 & 68
    \end{array}
  \]
  And by \Cref{Thm:gcd_W_neg_ab}, we get the values of the unbounded part of $\seqx{\GCDs{Q}{\pm 2}{\pm 2}}$.
\end{proof}

We can use \Cref{Thm:gcd_move_shift} to get the values of $\GCDs{Q}{\mp 2}{\pm 2}$ since $Q_{-1} = -2$, for example,
\[
  \GCDs{Q}{-2}{2} = \GCDs[n+1]{Q}{2}{2}, \qquad \GCDs{Q}{2}{-2} = \GCDs[n+1]{Q}{-2}{-2}.
\]



\begin{thebibliography}{10}

\bibitem{chen2011}
  K.-W. Chen,
  Greatest common divisors in shifted Fibonacci sequences,
  {\em J. Integer Sequences} {\bf 14} (2011), 
  \href{https://cs.uwaterloo.ca/journals/JIS/VOL14/Chen/chen70.html}{Article 11.4.7}.

\bibitem{conway1997}
  J. H. Conway,
  {\em The Sensual (Quadratic) Form},
  Mathematical Association of America, 1997.

\bibitem{dudley1971}
  U. Dudley and B. Tucker,
  Greatest common divisors in altered Fibonacci sequences,
  {\em Fibonacci Quart.} {\bf 9} (1971), 89--91.

\bibitem{hoggatt1974}
  V. E. Hoggatt, Jr.\ and C. T. Long,
  Divisibility properties of generalized Fibonacci polynomials,
  {\em Fibonacci Quart.} {\bf 12} (1974), 113--120.

\bibitem{horadam1965}
  A. F. Horadam,
  Basic properties of a certain generalized sequence of numbers,
  {\em Fibonacci Quart.} {\bf 3} (1965), 161--176.

\bibitem{kilic2011}
  E. Kili{\c{c}} and P. St{\u{a}}nic{\u{a}},
  Factorizations and representations of binary polynomial recurrences by matrix methods,
  {\em Rocky Mountain J. Math.} {\bf 41} (2011), 1247--1264.

\bibitem{koken2018}
  F. Koken and S. Arslan,
  GCD properties of the altered Pell and Pell Lucas numbers,
  {\em IOSR J. Math.} {\bf 14} (5) (2018), 82--89.

\bibitem{rahn2018}
  A. Rahn and M. Kreh,
  Greatest common divisors of shifted Fibonacci sequences revisited,
  {\em J. Integer Sequences} {\bf 21} (2018), 
  \href{https://cs.uwaterloo.ca/journals/JIS/VOL21/Kreh/kreh6.html}{Article 18.6.7}.

\bibitem{ray2017}
  P. K. Ray and S. S. Pradhan,
  Greatest common divisors of shifted balancing numbers,
  {\em Bol.\ Soc.\ Parana.\ Mat.} {\bf 35} (3) (2017), 273--283.

\bibitem{spilker2016}
  J. Spilker,
  The GCD of the shifted Fibonacci sequence.
  \newblock In J. Sander, J. Steuding, and R. Steuding, eds.,
  {\em From Arithmetic to Zeta-Functions}, Springer, 2016, pp.~473--483.

\bibitem{thongkam2018}
  B. Thongkam and N. Sailadda,
  The greatest common divisors of generalized Fibonacci and generalized Pell numbers,
  {\em Notes Number Theory Discrete Math.} {\bf 24} (1) (2018), 97--102.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2010 \emph{Mathematics Subject Classification}:
Primary 11B39; Secondary 11A05, 11B83.

\noindent \emph{Keywords}:
greatest common divisor, Horadam sequence, recurrence sequence.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000045},
\seqnum{A000032},
\seqnum{A000129},
\seqnum{A002203},
\seqnum{A001110}, and
\seqnum{A001541}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 1 2019;
revised version received  March 12 2020; April 3 2020.
Published in {\it Journal of Integer Sequences}, June 8 2020.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                


