<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[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}}}
\def\modd#1 #2{#1\ \mbox{\rm (mod}\ #2\mbox{\rm )}}

\DeclareMathOperator{\ord}{ord}
\DeclareMathOperator{\lcm}{lcm}

\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 The Generalized Bi-Periodic Fibonacci \\
\vskip .1in
Sequence Modulo $m$}
\vskip 1cm
\large
Hac\`ene Belbachir  and Celia Salhi\footnote{Corresponding author.}\\
USTHB\\
Faculty of Mathematics\\
RECITS Laboratory\\
16111 Bab Ezzouar, Algiers \\
Algeria\\
\href{mailto:hacenebelbachir@gmail.com}{\tt hacenebelbachir@gmail.com} \\
\href{mailto:salhicelia2@gmail.com }{\tt salhicelia2@gmail.com}\\
\href{mailto:csalhi@usthb.dz }{\tt csalhi@usthb.dz}
\end{center}

\vskip .2in

\begin{abstract} 
For given positive integers $a, b, c$, and $d$, we consider the generalized bi-periodic Fibonacci sequence $(F_{n})_{n\geq0}$ defined by the recurrence relation $F_{n}=aF_{n-1}+cF_{n-2}$ for $n$ even and $F_{n}=bF_{n-1}+dF_{n-2}$ for $n$ odd, with initial conditions $F_{0}=0$, $F_{1}=1$. In the present paper, we study the periodicity of $(F_{n})_{n\geq0}$ modulo a given integer $m\geq2$ relatively prime to $c$ and $d$. We extend some well-known results on the period and the rank of the classical Fibonacci sequence to the bi-periodic case.
\end{abstract}
\section{Introduction}
The Fibonacci sequence and its various generalizations have interested mathematicians for many years. Edson and Yayenie \cite{edson-yayenie} introduced the generalized Fibonacci sequence, also known as the bi-periodic Fibonacci sequence, by considering the following piecewise linear recurrence relation with two non-zero real parameters $a$ and $b$:
\begin{align}\label{1}
q_{0}=0, \  \ q_{1}=1,  \   \  q_{n}=
\begin{cases} aq_{n-1} + q_{n-2}, &amp;  \text{for $n$ even};\\
bq_{n-1} + q_{n-2}, &amp;   \text{for $n$ odd},
\end{cases} \ \ \ (n\geq 2).
\end{align}
Many sequences in the literature are special cases of this sequence. The case $a= b = 1$ corresponds to the classical Fibonacci sequence 
\seqnum{A000045}, and the case $a = b = 2$ gives the Pell sequence \seqnum{A000129}, while for $a = b = k$ for some positive integer $k$, we obtain the $k$-Fibonacci sequence \cite{Falcon}.
A further generalization has been defined in \cite{sahin, yayenie} by preserving the initial conditions and modifying the recurrence relation \eqref{1} in such a way that the resulting sequence \eqref{2} depends on four real parameters $a, b, c$, and $d$. Let $(F_{n})_{n\geq0}$ be the generalized bi-periodic Fibonacci sequence defined as follows:

\begin{align}\label{2}
F_{0}=0, \  \ F_{1}=1,  \   \  F_{n}=
\begin{cases} aF_{n-1} + cF_{n-2}, &amp;  \text{for $n$ even};\\
bF_{n-1} + dF_{n-2}, &amp;   \text{for $n$ odd},
\end{cases} \ \ \ (n\geq 2).
\end{align}
Notice that for $c=d=1$, $(F_{n})_{n\geq0}$ reduces to the sequence \eqref{1}. For the case $a=b$ and $c=d$, we have the $(a,c)-$Fibonacci sequence.

The periodicity of linear recurrence sequences reduced modulo an integer $m$ has been studied by several authors. The interest in this topic is the diversity of the fields of application such that cryptography (the generation of pseudo-random numbers), coding theory and electrical engineering. Wall \cite{wall} studied the periodicity of the Fibonacci sequence modulo an arbitrary integer $m$ and established many interesting results. 
Vinson \cite{vinson} extended the work of Wall and studied the rank of apparition of $m$ in the Fibonacci sequence. Recently, the periodicity of various generalizations of the Fibonacci sequence has been investigated in several papers; see \cite{Atribonacci, ait, Arecits,Plaza, hua, gupta, renault, vella}.

In the present paper, we investigate the periodicity of the generalized bi-periodic Fibonacci sequence $(F_{n})_{n\geq0}$ modulo $m\geq2$, where $a, b, c$, and $d$ are given positive integers. Assuming that $m$ is chosen such that $m$ is relatively prime to $c$ and $d$, we prove that $(F_{n})_{n\geq0}$ reduced modulo $m$ is periodic, i.e., there exists a positive integer $r$ such that 
\begin{equation}
F_{n+r}=F_{n}, \qquad \text{for all }n\geq 0.  \label{periodic}
\end{equation}
We extend some well-known results on the period and the rank of the classical Fibonacci sequences to the bi-periodic case.

Since we are dealing with the generalized bi-periodic Fibonacci sequences, reduced modulo $m$, the condition $a\not\equiv b$ (mod $m$) or $c\not\equiv d$ (mod $m$) ensures that the considered sequences are actually
bi-periodic. For the case where $a\equiv b$ (mod $m$) and $c\equiv d$ (mod $m$) $(F_{n}\bmod m)$ coincides with the $(a,c)$-Fibonacci sequence; see \cite{hua, renault}.

Tasc{\i} and K{\i}z{\i}l{\i}rmak \cite{Tasci} studied the period of the generalized bi-periodic Fibonacci sequences $F_{n}$ for the case $c=d=1$. The authors defined the period of $F_{n}$ modulo $m$ to be the least positive integer $r$ such that $F_{r}\equiv0$ (mod $m$) and $F_{r+1}\equiv 1$ (mod $m$). However, unlike the case where $a=b$, the integer $r$ does not necessarily satisfy Property \eqref{periodic}; see Example \ref{ex1}. Furthermore, we mention that \cite[Theorem 4]{Tasci} is true only if we add the condition $ab$ is also a quadratic residue modulo $p$ (see Example \ref{ex2} for $p=11$).
\section{The periodicity of the generalized bi-periodic Fibonacci sequences modulo $m$}
Let $a, b, c, d$, and $m$ be positive integers, and assume $m$ is chosen such that $\gcd(c,m)=\gcd(d,m)=1$. 
In this section, we investigate the period of $(F_{n})_{n\geq0}$ reduced modulo $m$.
Flacon and Plaza \cite{Plaza} determined the length of the period of the $k$-Fibonacci sequences reduced modulo an integer $m$. Notice that for $a=b=k$ and $c=d=1$, $(F_{n})_{n\geq0}$ corresponds to the $k$-Fibonacci sequences. 

Following the proof of \cite[Theorem 2]{Plaza}, we show in the next theorem that the sequence $(F_{n}\bmod m)_{n}$ is periodic.
\begin{theorem}
The sequence $(F_{n})_{n\geq0}$ is periodic modulo $m$. 
\end{theorem}
\begin{proof}
Since there are only $m^{2}$ pairs of integers modulo $m$, at least one repetition of a pair must occur within the following $m^{2}+1$ pairs of the sequence:
\begin{equation*}
(F_{0},F_{1}), (F_{2},F_{3}),\ldots,(F_{2m^{2}},F_{2m^{2}+1}).
\end{equation*}
Let $i$ and $j$ be integers such that $0\leq i&lt;j\leq m^{2}$. Let $(F_{2i},F_{2i+1})\equiv(F_{2j},F_{2j+1})$ (mod $m$), with $r=2j-2i$. It follows by induction that
\begin{equation*}
F_{n+r}=F_{n} \qquad \text{for all } n\geq2i.
\end{equation*}
Now, since $c$ and $d$ are invertible modulo $m$, by backward induction we see that the sequence $F_{n}$ is periodic.
Indeed, from the recurrence relation \eqref{2} we have

$F_{2i-1}\equiv F_{2j-1}, F_{2i-2}\equiv F_{2j-2}, \ldots, F_{1} \equiv F_{2j-2i+1}=F_{r+1}$, and $F_{0} \equiv F_{2j-2i}=F_{r}$.
\end{proof}
Let $k(m)$ denote the period of the sequence $(F_{n}\bmod{m})$, i.e., the least positive integer $r$, for which \eqref{periodic} is satisfied.
\begin{example}
We consider the generalized bi-periodic Fibonacci sequence generated by $a=2$ and $b=c=d=1$ that we find in \cite{ency} as \seqnum{A048788}. The first few terms of this sequence reduced modulo $p=3$ are \[0,1,2,0,2,2,0,2,1,0,1,1\ldots.\]
Then we only have repetitions of these terms, so $k(3)=12$.  \label{ex1}
\end{example}
\begin{theorem}
Let $r$ be a positive integer. If $a\not \equiv \modd{b} {m}$ or $c \not\equiv \modd{d} {m}$, the following assertions are equivalent:
\begin{enumerate}
\item[(i)] $F_{n+r}\equiv \modd{F_{n}} {m}$ for all $n\geq0$;
\item[(ii)] $(F_{r},F_{r+1},F_{r+2},F_{r+3})\equiv \modd{(F_{0},F_{1},F_{2},F_{3})} {m}$;
\item[(iii)] $(F_{r},F_{r+1})\equiv \modd{(F_{0},F_{1})} {m}$, and the integer $r $ is even.
\end{enumerate}
In particular, the period $k(m)$ is an even number. \label{TH1}
\end{theorem}
\begin{proof}
Let $r$ be a positive integer such that $(F_{r},F_{r+1},F_{r+2},F_{r+3})\equiv (F_{0},F_{1},F_{2},F_{3})$ (mod $m$). If $r$ is an odd number, we have modulo $m$
\begin{equation*}
a=F_{2}\equiv F_{r+2}=bF_{r+1}+dF_{r}\equiv bF_{1}+dF_{0}=b,
\end{equation*}
and
\begin{equation*}
bF_{2}+dF_{1}=F_{3}\equiv F_{r+3}=aF_{r+2}+cF_{r+1}\equiv aF_{2}+cF_{1}.
\end{equation*}
Contradiction.
\end{proof}
So when $a\not\equiv b$ (mod $m$) or $c\not \equiv d$ (mod $m$), the period $k(m)$ is the smallest integer $r$ satisfying one of the three properties of Theorem \ref{TH1}. Since any positive integer $r$ that satisfies \eqref{periodic} is a multiple of the period $k(m)$ by Theorem \ref{TH1}, we have 
\begin{align}
\begin{cases}
F_{r} \equiv \modd{0} {m}\\
F_{r+1}\equiv \modd{1} {m}
\end{cases}
\Longleftrightarrow k(m)\mid r,
\label{period-2terms}
\end{align} 
for any $r\in 2\mathbb{N}$.

The following theorem shows that we can reduce the computation of $k(m)$ to that of $k(p^{e})$ for all prime power factor $p^{e}$ of $m$.
\begin{theorem}
Let $m=p_{1}^{e_{1}}p_{2}^{e_{2}}\cdots p_{s}^{e_{s}}$ be the prime decomposition of $m$. Then 
\begin{equation*}
k(m)= \lcm({k(p_{1}^{e_{1}}),k(p_{2}^{e_{2}}),\ldots,k(p_{s}^{e_{s}})}).
\end{equation*}\label{th0}
\end{theorem}
\begin{proof}
The proof is similar to the proof of \cite[Theorem 2]{wall}.
\end{proof}
\begin{theorem}\label{case}
If $m\mid a$, then we have $k(m)=2\ord_{m}(d)$, where $ord_{m}(d)$ is the multiplicative order of $d$ modulo $m$.
\end{theorem}
\begin{proof}
Assume that $a\equiv0$ (mod $m$). Using Relation \eqref{2}, and following a straightforward induction we get
\begin{align*}
F_{n}\bmod m =
\begin{cases}
 0,    &amp;  \text{if} \ n=2k;\\
 d^{k},&amp;  \text{if} \ n=2k+1.
\end{cases}
\end{align*}
Since $n=2\ord_{m}(d)$ is the least integer satisfying the congruences $ F_{2n}\equiv0$ (mod $m$) and $F_{2n+1}\equiv 1$ (mod $m$), it follows from \eqref{period-2terms} that $k(m)=2\ord_{m}(d)$.
\end{proof}
\subsection{The generalized bi-periodic Fibonacci sequences over a finite field}
Sahin \cite{sahin} provided the Binet formula for even and odd indices as follows:
\begin{equation}\label{binet}
\left\lbrace
\begin{aligned}
F_{2n}  &amp;=a\frac{\alpha^{n}-\beta^{n}}{\alpha -\beta};\\
F_{2n+1}&amp;=\frac{\alpha^{n+1}-\beta^{n+1}}{\alpha -\beta}-c\frac{\alpha^{n}-\beta^{n}}{\alpha -\beta},
\end{aligned}
\right.
\end{equation}
where $\alpha,\beta =\frac{(A\pm \sqrt{\Delta})}{2}$ are the roots of the quadratic equation $f(x)=x^{2}-Ax+B=0$ with $A=ab+c+d$, $B=cd$, and $\Delta$ the discriminant of $f(x)$.

Let $\mathbb F_{q}$ denote the finite field of order $q = p^{e}$ with $e\geq 1$, and let $p$ be an odd prime.
In this subsection, we investigate the period of $(F_{n})_{n\geq0}$ over the finite field $\mathbb F_{q}$ using as a main tool the Binet formula \eqref{binet} and Statement \eqref{period-2terms}.

We assume that $\gcd(c,p)=\gcd(d,p)=1$ to guarantee that $(F_{n})_{n\geq0}$ is periodic over the field $\mathbb F_{p^{e}}$. We begin by investigating the period modulo a prime $p$, then we generalize to a power of $p$. We deal only with the cases where $a\not \equiv b$ (mod $p$) or $c\not \equiv d$ (mod $p$). For analogous results in the case $a\equiv b$ (mod $p$) and $c\equiv d$ (mod $p$); see \cite{hua, gupta, renault}.
We establish a divisibility relation for $k(p)$ according to the nature of the discriminant $\Delta$ in $\mathbb F_{p}^{\ast}$. When $\Delta\equiv 0$ (mod $p$), we obtain an equality statement for $k(p)$ in terms of the  order of the zero of the polynomial $f(x)$ in $\mathbb{F}_{p}^{\ast}$. 

Notice that if $p\mid a$, then we get $k(p)=2\ord_{p}(d)$ using Theorem \ref{case}, where $ord_{p}(d)$ is the order of $d$ in $\mathbb F_{p}^{\ast}$. So in the sequel, we may assume that $\gcd(a,p)=1$. We also use the Legendre symbol: 
\begin{displaymath}
\left(\frac{q}{p}\right) = \begin{cases}
1, &amp; \text{for $r$ a nonzero quadratic residue modulo $p$;}\\
-1, &amp; \text{for $r$ a quadratic residue modulo $p$.}
\end{cases}
\end{displaymath}
\begin{theorem}
Let $p$ be an odd prime. If $\Delta$ is a nonzero quadratic residue modulo $p$, then $k(p)\mid2(p-1)$. Furthermore, if $\left(\frac{\alpha}{p}\right)=\left(\frac{\beta}{p}\right)=1$, then $k(p)\mid(p-1)$. \label{th1}
\end{theorem}

\begin{proof}
Suppose that $\Delta$ is a nonzero quadratic residue modulo $p$. Then we have $\alpha, \beta \in \mathbb F_{p}^{\ast}$, and by the Fermat little theorem we get
\begin{equation*}
\alpha^{p-1}\equiv \modd{1} {p} \text{ {and }}\beta^{p-1}\equiv\modd{1} {p}.
\end{equation*}
Now, using the Binet formula for even and odd indices \eqref{binet}, we obtain
\begin{equation*}
F_{2(p-1)}=a\frac{\alpha^{p-1}-\beta^{p-1}}{\alpha-\beta}\equiv\modd{0} {p}
\end{equation*}
and
\begin{equation*}
F_{2(p-1)+1}=\frac{\alpha^{p}-\beta^{p}}{\alpha-\beta}-c\frac{\alpha^{p-1}-\beta^{p-1}}{\alpha-\beta}\equiv\modd{1} {p}.
\end{equation*}
Thus, by \eqref{period-2terms}, $k(p)\mid2(p-1)$.

For the second part, suppose that $\left(\frac{\alpha}{p}\right)=\left(\frac{\beta}{p}\right)=1$. Then we have 
\[
\alpha^{\frac{p-1}{2}}= \beta^{\frac{p-1}{2}}\equiv\modd{1} {p}.
\]
Therefore,
\begin{equation*}
F_{p-1}=a\frac{\alpha^{\frac{p-1}{2}}- \beta^{\frac{p-1}{2}}}{\alpha-\beta}\equiv\modd{0} {p} 
\end{equation*}
and
\begin{equation*}
F_{p}=\frac{\alpha^{\frac{p+1}{2}}-\beta^{\frac{p+1}{2}}}{\alpha-\beta}-c\frac{\alpha^{\frac{p-1}{2}}- \beta^{\frac{p-1}{2}}}{\alpha-\beta}\equiv\modd{1} {p}.
\end{equation*}
Thus, by \eqref{period-2terms}, we get $k(p)\mid (p-1)$.
\end{proof}
\begin{remark}
If $c=d$, then we have $\alpha \beta =c^{2}$. Using the properties of Legendre symbol, we get 
\begin{equation*}
\left(\frac{\alpha}{p}\right)=\left(\frac{\beta}{p}\right)
\end{equation*}
Moreover, since $\alpha\in \mathbb F_{p}^{\ast}$, we have $ab=\alpha^{-1}(\alpha -c)^{2}$, where $\alpha^{-1}$ is the inverse of $\alpha$ modulo $p$. Thus, 
\begin{equation*}
\left(\frac{\alpha}{p}\right)=\left(\frac{ab}{p}\right).
\end{equation*}
\end{remark}
Now, if $\Delta$ is a quadratic nonresidue modulo $p$, then the polynomial $f(x)$ is irreducible in $\mathbb F_{p}$. Therefore, we work in $\mathbb F_{p^{2}}= \mathbb{F}_{p}[\sqrt{\Delta}]$, the splitting field of the
polynomial $f(x)$ over $\mathbb F_{p}$. 

Since the Frobenius automorphism of $\mathbb F_{p^{2}}$ fixes $\mathbb F_{p}$, it must permute the zeros of any irreducible quadratic polynomial of $\mathbb F_{p}[x]$. Therefore, by applying the Frobenius automorphism to $\alpha$, a root of the equation $f(x)=0$, we obtain the other root $\beta= \alpha^{p}$. Hence, 
\begin{equation}
\alpha^{p+1}= \beta^{p+1}=\alpha\beta. \label{gal}
\end{equation}
\begin{theorem}
Let $p$ be an odd prime. If $\Delta$ is a quadratic nonresidue modulo $p$, then $k(p)\mid 2\ord_{p}(cd)(p+1)$. \label{th2}
\end{theorem}
\begin{proof}
Suppose that $\Delta$ is a quadratic nonresidue modulo $p$. Then we have $\alpha^{p+1}=\beta^{p+1}=cd$.
Using the Binet formula \eqref{binet}, we get
\begin{equation*}
F_{2\ord_{p}(cd)(p+1)}=a\frac{(\alpha^{p+1})^{\ord_{p}(cd)}-(\beta^{p+1})^{\ord_{p}(cd)}}{\alpha-\beta}\equiv\modd{0} {p}
\end{equation*}
and
\begin{equation*}
\begin{aligned}
F_{2\ord_{p}(cd)(p+1)+1}&amp;= \frac{\alpha(\alpha^{p+1})^{\ord_{p}(cd)}-\beta (\beta^{p+1})^{\ord_{p}(cd)}}{\alpha-\beta}
                              &amp;-c\frac{(\alpha^{p+1})^{\ord_{p}(cd)}-(\beta^{p+1})^{\ord_{p}(cd)}}{\alpha-\beta}\\
                              &amp;\equiv\modd{1} {p}.
\end{aligned}
\end{equation*}
Therefore, \eqref{period-2terms} implies that $k(p)\mid 2\ord_{p}(cd)(p+1)$.
\end{proof}
\begin{example}\label{ex2}
We take $a=c=d=1$ and $b=2$. So $F_{n}$ corresponds to \seqnum{A002530} in \cite{ency}, and we have $\Delta =12$.

Let $p=11$; notice that $\Delta$ is a nonzero quadratic residue and $ab$ is a quadratic nonresidue. From Theorem \ref{th1}, we have $k(p)\mid 2(p-1)$ and $k(p)\nmid(p-1)$. So by giving the first few terms up to $n=5$ ($0,1,1,3,4,0$) we get $k(11)=20$.

We take $p=7$. Since $\Delta$ is a quadratic nonresidue modulo $p$ from Theorem \ref{th2}, we obtain $k(p)\mid 16$.
So we only have to calculate $10$ terms of this sequence modulo $7$ \[ 0,1,1,3,4,4,1,6,0,6.\] Thus, we have $k(7)=16$.
\end{example}
\begin{example}
Take $a=3, b=d=1$, and $c=4$. For $p=11$ both $\Delta$ and $ab$ are nonzero quadratic residues modulo $p$, and from Theorem \ref{th1} we have $k(p)|(p-1)$. Moreover, $k(p)$ is an even integer and $F_{2}\bmod{11}=3$. So the only possible value is $k(11)=10$.
\end{example}
In the following, we consider the case where $\Delta \equiv0$ (mod $p$). We begin by giving the Binet formula of $F_{n}$ for even and odd indices as follows:
\begin{equation*}
\left\lbrace
\begin{aligned}
F_{2n}  &amp;=a\sum_{i=1}^{n}\alpha^{n-i}\beta^{i-1};\\
F_{2n+1}&amp;=\alpha^{n}+\sum_{i=1}^{n}\alpha^{n-(i+1)}\beta^{i}(\alpha-c).
\end{aligned}
\right.
\end{equation*}
Since $\Delta \equiv0$ (mod $p$), the equation $f(x)=0$ has a repeated root $\alpha$ in $\mathbb F_{p}^{\ast}$. So modulo $p$, we get the following congruences: 
\begin{equation}\label{reproot}
\left \lbrace
\begin{aligned}
F_{2n}  &amp;\equiv a n\alpha^{n-1}; \\
F_{2n+1}&amp;\equiv(n+1)\alpha^{n}-cn\alpha^{n-1}. 
\end{aligned} 
\right.
\end{equation}
We give in the next theorem an explicit equality statement for $k(p)$ in terms of the order of $\alpha$ in $\mathbb F_{p}^{\ast}$.
\begin{theorem}\label{th3}
Let $p$ be an odd prime. If $\Delta \equiv\modd{0} {p}$, then we have $k(p)=2p\cdot\ord_{p}(\alpha)$. 
\end{theorem}
\begin{proof}
Assume that $\Delta \equiv0$ (mod $p$) and $\gcd(a,p)=1$. By using \eqref{reproot} we obtain the following:
\begin{equation*}
\begin{split}
{F}_{2n}\equiv 0 \ \text{and} \ {F}_{2n+1}\equiv 1 &amp; \Longleftrightarrow {n(\alpha)^{n-1}}\equiv0{\ }\text{and}{\ (\alpha )^{n}}\equiv 1 \\
&amp; \Longleftrightarrow {p\mid n} \ \text{and} \ {\ord_{p}(\alpha)\mid n} \\
&amp; \Longleftrightarrow \lcm ({p,\ord_{p}(\alpha)}) {\mid n} \\
&amp; \Longleftrightarrow {p\cdot\ord_{p}(\alpha)\mid n}. \\
\end{split}
\end{equation*}
Therefore, $k(p)=2p\cdot\ord_{p}(\alpha)$. 
\end{proof}
Theorem \ref{th0} shows that it is easy to compute $k(m)$ once we know $k(p^{e})$ for all prime power factors $p^{e}$ of $m$. The corollary of the following theorem is crucial to the investigation of the period modulo $p^{e}$.
\begin{theorem}
Let $p$ be a prime number and $n$ be a positive integer. If $a\equiv\modd{1} {p}$, then $a^{p^{n}}\equiv \modd{1} {p^{n+1}}$. \label{th4}
\end{theorem}

\begin{proof}
Let $P(n)$ be the proposition $a^{p^{n}}\equiv1$ (mod $p^{n+1}$). We have
\begin{equation*}
a\equiv 1\pmod{p}\Longrightarrow \exists s\in \mathbb{Z} \ \text{such as} \ a=sp+1.
\end{equation*}
For $n=1$,
$a^{p}=(sp+1)^{p}$ $=\displaystyle\sum_{i=0}^{p}\binom{p}{i}(sp)^{i}=1+sp^{2}+\displaystyle \sum_{i=2}^{p}\binom{p}{i}(sp)^{i}\equiv 1$ (mod $p^{2}$).

Thus, $P(1)$ is true. Assume that $P(n)$ is true up to some $n$ and consider $P(n+1)$
\[
a^{p^{n+1}}=(a^{p^{n})^{p}}=(sp^{n+1}+1)^{p}=\displaystyle \sum_{i=0}^{p}\binom{p}{i}(sp^{n+1})^{i}=1+sp^{n+2}+\displaystyle \sum_{i=2}^{p}\binom{p}{i}(sp^{n+1})^{i}.
\]
Since $p^{n+2}\mid(sp^{n+1})^{i}$ for $2\leq i\leq p$, we obtain
$a^{p^{n+1}}\equiv 1 $ (mod $p^{n+2}$).

Thus, $P(n)$ holds by induction.
\end{proof}
\begin{corollary}
Let $p$ be an odd prime such that $\gcd(a,p)=1$, and let $e$ be a positive integer. Then 
\begin{equation*}
\alpha^{\frac{k(p)}{2}p^{e-1}}\equiv \beta^{\frac{k(p)}{2}p^{e-1}}\equiv\modd{1} {p^{e}}.
\end{equation*}
\label{corollary}
\end{corollary}
\begin{proof}
If we assume $p\mid\Delta$, then $\alpha \equiv \beta$ (mod $p$). From Theorem \ref{th3}, we get $k(p)=2p\cdot\ord_{p}(\alpha)$.
Thus, 
\[\alpha^{\frac{k(p)}{2}}\equiv \beta^{\frac{k(p)}{2}}\equiv \modd{1} {p}.\]
Now, assume that $p\nmid\Delta$. Since $p\nmid a$ by the Binet formula \eqref{binet}, we have
\begin{equation*}
F_{k(p)}=a\frac{\alpha^{\frac{k(p)}{2}}-\beta^{\frac{k(p)}{2}}}{\alpha-\beta }\equiv\modd{0} {p}\iff \alpha^{\frac{k(p)}{2}}\equiv \modd{\beta^{\frac{k(p)}{2}}} {p}
\end{equation*}
and
\begin{equation*}
\begin{aligned}
F_{k(p)+1} &amp; =\frac{\alpha \alpha^{\frac{k(p)}{2}}-\beta \beta^{\frac{k(p)}{2}}}{\alpha-\beta}-c\frac{\alpha^{\frac{k(p)}{2}}-\beta^{\frac{k(p)}{2}}}{\alpha-\beta} \\
           &amp; \equiv \alpha^{\frac{k(p)}{2}}  \\
           &amp; \equiv \modd{1} {p}.           
\end{aligned}
\end{equation*}
Hence, by applying Theorem \ref{th4} to $\alpha^{\frac{k(p)}{2}}$ and $\beta^{\frac{k(p)}{2}}$ we obtain the desired result.
\end{proof}
Now that we have results helping in the calculation of $k(p)$, we connect $k(p)$ to $k(p^{e})$ in Theorem \ref{th5}. 
\begin{theorem}\label{th5}
Let $p$ be an odd prime such that $\gcd(a,p) =1$, and let $e$ be a positive integer. Then $k(p^{e})\mid p^{e-1}k(p)$.
\end{theorem}
\begin{proof}
Since $\gcd(a,p) =1$ from Corollary \ref{corollary}, we have
\[
\alpha^{\frac{k(p)}{2}p^{e-1}}\equiv \beta^{\frac{k(p)}{2}p^{e-1}}\equiv\modd{1} {p^{e}}.
\]
\begin{itemize}
\item If we assume $p\nmid\Delta$, then we have
 \begin{equation*}
 F_{k(p)p^{e-1}}=a\frac{\alpha^{\frac{k(p)p^{e-1}}{2}}-\beta ^{\frac{{k(p)p^{e-1}}}{2}}}{\alpha-\beta}\equiv       
 \modd{0} {p^{e}}
 \end{equation*}
 and
 \begin{equation*}
 \begin{aligned}
 F_{k(p)p^{e-1}+1} &amp; =\frac{\alpha \alpha^{\frac{^{k(p)p^{e-1}}}{2}}-\beta \beta^{\frac{^{k(p)p^{e-1}}}{2}}} 
 {\alpha-\beta}-c\displaystyle \frac{\alpha^{\frac{^{k(p)p^{e-1}}}{2}}-\beta^{\frac {^{k(p)p^{e-1}}}{2}}}
 {\alpha-\beta} \\
                   &amp; \equiv \modd {1} {p^{e}}.
 \end{aligned}
 \end{equation*}
\item If we assume $p\mid \Delta$, then using \eqref{reproot} we obtain
 \begin{equation*}
 {F}_{k(p)p^{e-1}}{=a\frac{^{k(p)p^{e-1}}}{2}\alpha ^{\frac{^{k(p)p^{e-1}}}{2}-1}}
 \end{equation*}
 and
 \begin{equation*}
 \begin{aligned}
 F_{k(p)p^{e-1}+1} &amp; =\displaystyle(\frac{\beta^{k(p)p^{e-1}}}{2}+1)\alpha^{\frac{{k(p)p^{e-1}}}{2}}-c 
 \frac{\beta^{k(p)p^{e-1}}}{2}\alpha^{\frac{{k(p)p^{e-1}}}{2}-1}  \\
                   &amp; \equiv\modd{\alpha^{\frac{k(p)}{2}p^{e-1}}} {p^{e}}.               
 \end{aligned}
 \end{equation*}
 Now, since we have $k(p)=2p\cdot\ord{_p} (\alpha)$, the following congruences holds 
 \begin{displaymath}
 \begin{cases}
 F_{k(p)p^{e-1}}\equiv \modd{0} {p^{e}};\\
 F_{k(p)p^{e-1}+1}\equiv \modd{1} {p^{e}}.
 \end{cases}
 \end{displaymath}
\end{itemize}
Therefore, by \eqref{period-2terms}, $k(p^{e})\mid p^{e-1}k(p)$.
\end{proof}
\section{The rank of the generalized bi-periodic Fibonacci sequences modulo $m$}
The rank of $(F_{n})_{n\geq0}$ modulo $m$ is the least positive integer $r$ such that $F_{r}\equiv 0$ (mod $m$). Let $d(m)$ denote the rank of $(F_{n}\bmod m)$. It is obvious that if $m\mid a$, we have $d(m)=2$. 

In the rest, we assume that $c=d$ and $\gcd(a,m)=1$.
\begin{lemma}(\cite{Tan})
Let $\zeta(n)$ be the parity function, and assume that $c=d$. The sequences $(F_{n})_{n\geq0}$ satisfies the following identities:
\begin{itemize}
\item[(i)] $(b/a)^{\zeta(ng+n)}F_{g}F_{n+1}+(b/a)^{\zeta(ng+g)}cF_{n}F_{g-1}=F_{g+n}\qquad (g\geq 1, n\geq 0)$.
\item[(ii)] $(b/a)^{\zeta( ng+n)}F_{n}F_{g+1}+(b/a)^{\zeta(ng+g)}F_{n+1}F_{g}=(-c)^{g}F_{n-g} \qquad (g\geq 0, n\geq 0)$.
\end{itemize}
\label{lemma1}
\end{lemma}
Wall \cite[Theorem 3]{wall} proved that the indices of the Fibonacci sequence terms that are zero modulo $m$ form an arithmetic progression. In the following theorem we give an analogous result for the bi-periodic case.
\begin{theorem}
The terms for which $F_{n}\equiv\modd{0} {m}$ have subscripts that form a simple arithmetic progression, i.e., $n=xl$; for $x=0,1,2,\ldots$. Moreover, $l=d(m)$ gives all $n$ with $F_{n}\equiv \modd{0} {m}$.
\label{TH2}
\end{theorem}
\begin{proof}
Assume that $\gcd (a,m)=1$, $F_{i}\equiv0$ (mod $m$), and $F_{j}\equiv0$ (mod $m$). By setting $g=i$ and $n=j$ in the identities (i) and (ii) of Lemma \ref{lemma1}, we obtain
\begin{equation}
F_{i+j}\equiv\modd{0} {m}.   \label{3}
\end{equation}
And with $\left( i\geq j\right)$
\begin{equation}
F_{i-j}\equiv\modd{0} {m}.   \label{4}
\end{equation}
Let \[ S=\left\{k \in \mathbb Z^{\ast} \mid{\ }F_{k}\equiv \modd{0} {m} \right\}.\] Since $F_{k(m)}\equiv0$ (mod $m$) the set $S$ is not empty. Let $d$ be the smallest integer in $S$. By using induction and congruence (\ref{3}), we get $F_{ld}\equiv 0$ (mod $m$) for $l\in \mathbb Z^{\ast}$. Now let $\alpha \in S$, and suppose that $d\mid$ $\alpha$. Then there are two nonnegative integers $\theta$ and $\gamma$ such that $\alpha=d\theta+\gamma$  with $0&lt;\gamma&lt;d$. From (\ref{4}), we have $F_{\alpha-\theta d}=F_{\gamma}\equiv0$ (mod $m$). This is
a contradiction, since $d$ is the smallest integer in $S$. Thus, $\alpha$ is a multiple of $d$.
\end{proof}
From Theorem \ref{TH2}, we have 
\begin{equation}
F_{n}\equiv0\pmod{m}\Longleftrightarrow d(m)\mid n.  \label{Rank}
\end{equation}
In particular, since $F_{k(m)}\equiv F_{0}\equiv$ (mod $m$) then $d(m)\mid k(m)$.

Let $c=1$ and $a,b\in\mathbb{F}_{2}$. Table \ref{tab} gives the rank of $(F_{n}\bmod{2})$.

\begin{table}[H]
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
$a$ &amp; $b$ &amp; $c$ &amp; $d(p)$\\
\hline
$0$ &amp; $1$ &amp; $1$ &amp; $2$  \\
$1$ &amp; $0$ &amp; $1$ &amp; $4$ \\
\hline
\end{tabular}
\end{center}
\caption{$p=2$}
\label{tab}
\end{table}

We are now ready to state our theorem containing some fundamental results about the rank of $(F_{n}\bmod m)$.
\begin{theorem}
Let $m\geq 2$, and $p$ be an odd prime such that $\gcd(a,p)=\gcd(c,p)=1$. Then
\begin{enumerate}
\item[(a)] If $\Delta$ is a nonzero quadratic residue modulo $p$, then $d(p)\mid(p-1)$.
\item[(b)] If $\Delta$ is a quadratic nonresidue modulo $p$, then $d(p)\mid2(p+1)$.
\item[(c)] If $\Delta \equiv0\pmod{p}$, then if $p\mid b$ we have $d(p)=2p$ otherwise, $d(p)=p$.
\item[(d)] If $n\mid m$, then $d(n)\mid d(m)$.
\item[(e)] Let $m=p_{1}^{e_{1}}p_{2}^{e_{2}}\cdots p_{n}^{e_{n}}$ be the prime decomposition of $m$. Then 
\begin{equation*}
d(m)=\lcm({d(p_{1}^{e_{1}}),d(p_{2}^{e_{2}}), \ldots, d(p_{n}^{e_{n}})}).
\end{equation*}
\end{enumerate}
\end{theorem}
\begin{proof}
Let $p$ be an odd prime, and let $\gcd(a,p)=1$.
\begin{enumerate}
\item[(a)] Suppose that $\Delta$ is a nonzero quadratic residue modulo $p$. Then $\alpha,\beta \in \mathbb{F}_{p}^{\ast}$ and $\left(\frac{\alpha}{p}\right)=\left(\frac{\beta}{p}\right)$. Hence, we have
\begin{equation*}
F_{p-1}=a\frac{\alpha^{\frac{p-1}{2}}-\beta^{\frac{p-1}{2}}}{\alpha-\beta }\equiv\modd{0} {p}.
\end{equation*}
Thus, by (\ref{Rank}), $d(p)\mid(p-1)$.
\item[(b)] Suppose that $\Delta$ is a quadratic nonresidue modulo $p$. Then by (\ref{gal}), we have 
\begin{equation*}
F_{2(p+1)}{=}a\frac{\alpha^{p+1}-\beta^{p+1}}{\alpha-\beta}\equiv\modd{0} {p}.
\end{equation*}
Thus, from (\ref{Rank}), we get $d(p)\mid2\left( p+1\right)$.
\item[(c)] Suppose that $\Delta\equiv0$ (mod $p$).

If we assume that $p\mid b$, then we have $\alpha=c$. Using \eqref{reproot}, we obtain
\begin{equation*}
F_{2n}\equiv{an(c)^{n-1}} \ \text{and} \ F_{2n+1}\equiv{(c)^{n}}.
\end{equation*}
Then we have $F_{2n+1}\not\equiv0\pmod{p}$ since $\gcd(c,p)=1$, and $d(p)$ must be even.
Note that we have $F_{2n}\equiv\modd{0} {p}$ if and only if $p\mid n$. Therefore, we obtain $d(p)= 2p$.

Now, if $p\nmid b$ then $\alpha=-c$, and we have
\begin{equation*}
F_{2n}\equiv{an(-c)^{n-1}}\equiv\modd{0} {m}\Longleftrightarrow p\mid n
\end{equation*}
and
\begin{equation*}
F_{2n+1}\equiv(2n+1){(-c)^{n}}\equiv\modd{0} {m}\Longleftrightarrow p\mid(2n+1).
\end{equation*}
Since $d(p)$ is the smallest positive integer $n$ for which $F_{n}\equiv 0$ (mod $p$), we obtain $d(p)=p$.
\item[(d)] Since $F_{d(m)}\equiv0$ (mod $m$) and $n\mid m$, then we have $F_{d(m)}\equiv0$ (mod $n$). Thus, by (\ref{Rank}), $d(n)\mid d(m)$.
\item[{}] For the proof of (e), see \cite[Lemma 2]{vinson}.
\end{enumerate}
\end{proof}
\section{Acknowledgments}
The authors would like to thank the referee for his/her careful reading and helpful comments which have improved the quality of this paper. We would also like to thank Professor Ait Amrane Yacine for her contribution in the realization of this work. We are grateful for the partial support of DGRSDT under grant number C0656701.
\begin{thebibliography}{99}
\bibitem{Atribonacci} L. Ait-Amrane and H. Belbachir, Periods of tribonacci sequences and elliptic curves, {\it Algebra Discrete Math.} {\bf 25} (2018), 1--17.
\bibitem{ait} L. Ait-Amrane, H. Belbachir, and K. Betina, Periods of Morgan-Voyce sequences and elliptic curves {\it Math. Slovaca} {\bf 6} (2016), 1267--1284.
\bibitem{Arecits} L. Ait-Amrane and H. Belbachir, The three different forms of the periods of the Morgan-Voyce sequence modulo odd primes, {\it Les annales RECITS} {\bf 3} (2016), 27--33.
\bibitem{edson-yayenie} M. Edson and O. Yayenie, A new generalization of Fibonacci sequences and extended Binet's formula, {\it Integers} {\bf 9} (2009), 639--654.
\bibitem{Falcon} S. Falcon and \'{A}. Plaza, On the Fibonacci $k$-numbers, {\it Chaos Solitons Fractals} {\bf 32} (2007), 1615--1624.
\bibitem {Plaza} S. Falcon and \'{A}. Plaza, $k$-Fibonacci sequences modulo $m$, {\it Chaos Solitons Fractals} {\bf 41} (2009), 497--504.
\bibitem{hua} H. C. Li, On second-order linear recurrence sequences, {\it Fibonacci Quart.} {\bf 37} (1999), 342--349.
\bibitem{gupta} S. Gupta, P. Rockstroh, and F. E. Su, Splitting fields and periods of Fibonacci sequences modulo primes, {\it Math. Mag.} {\bf 85} (2012), 130--135.
\bibitem{renault} M. Renault, The period, rank and order of the $(a,b)$-Fibonacci sequence mod $m$, {\it Math. Mag.} {\bf 86} (2013), 372--380.
\bibitem{sahin} M. Sahin, The Gelin-Ces\`{a}ro identity in some conditional sequences, {\it Hacet. J. Math. Stat.} {\bf 40} (2011), 855--861.
\bibitem{ency} N. J. A. Sloane et al., {\it The On-Line Encyclopedia of Integer Sequences}, published electronically at \url{https://oeis.org}, 2021.  
\bibitem{Tan} E.\ Tan and H. Leung, Some basic properties of the generalized bi-periodic Fibonacci and Lucas sequences, {\it Adv. Difference Equ.} {\bf 26} (2020), 1--11.
\bibitem{Tasci} D. Tasc{\i} and G. Ozkan K{\i}z{\i}l{\i}rmak, On the periods of biperiodic Fibonacci and biperiodic Lucas numbers, {\it Discrete Dyn. Nat. Soc.} (2016), 1--5.
\bibitem{vella} D. Vella and A. Vella, Cycles in the generalized Fibonacci sequence modulo a prime, {\it Math. Mag.} {\bf 75} (2002), 294--299.
\bibitem{vinson} J. Vinson, The relation of the period modulo $m$ to the rank of apparition of $m$ in the Fibonacci sequence, {\it Fibonacci Quart.} {\bf 1} (1963), 37--45.
\bibitem{wall} D. D. Wall, Fibonacci series modulo $m$, {\it Amer. Math. Monthly} {\bf 67} (1960), 525--532.
\bibitem{yayenie} O. Yayenie, A note on generalized Fibonacci sequences, {\it Appl. Math. Comput.} {\bf 217} (2011), 5603--5611.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11B39;
Secondary 11B50, 11A07.

\noindent {Keywords: } generalized bi-periodic Fibonacci sequence, period, rank, finite field.

\bigskip\hrule\bigskip

\noindent (Concerned with sequences
\seqnum{A000045},
\seqnum{A000129},
\seqnum {A002530}, and
\seqnum {A048788}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 3 2021;
revised versions received  July 9 2021; September 20 2021; 
September 21 2021; September 24 2021.
Published in {\it Journal of Integer Sequences}, October 1 2021.

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