1 Introduction

There has been great attention and focus on difference equations. Just like differential equations, there are techniques that one can use to solve difference equations. One method for solving them is to use Lie symmetry analysis. In this approach, one finds an invariant which can be used to find a simpler form of the equation. Amongst the first people to use Lie symmetry analysis to solve difference equations are Maeda [12] and Hydon [9]. Examples of the use of difference equations in real-life include modeling the proliferation of disease, loan payments, population studies, etc [4, 11].

Recurrence equations of a general order have been investigated in the literature and from different approaches by several authors [1,2,3, 5, 6, 8]. In their work, Almatrafi and others [1] discussed the exact solutions, stability, oscillation and periodic aspects of the the difference equations

$$\begin{aligned} \eta _{n+1}=\frac{\eta _{n-4k+1}}{\pm 1 \pm \prod \nolimits _{i=1}^{k} \eta _{n-4i+1}}. \end{aligned}$$
(1)

These equations are special cases of a more generalized setting

$$\begin{aligned} \eta _{n+1}=\frac{\eta _{n-4k+1}}{a_n +b_n \prod \nolimits _{i=1}^{k} \eta _{n-4i+1}}, \end{aligned}$$
(2)

where \(a_n\) and \(b_n\) are arbitrary real sequences. One can readily see that with a suitable change of variables, the above equations can be derived from the higher order Berverton–Holt difference [3] equation

$$\begin{aligned} r_{n + l} = \frac{\mu _nK_nr_{n}}{K_n + (\mu _n-1)r_{n}}, \end{aligned}$$
(3)

where \(\mu _{n}>1\) denotes the growth rate, \(K_n\) is the carrying capacity and \(r_0, r_1, \ldots , r_{l-1}\) are the positive initial values.

In this paper, we perform a symmetry analysis of the equivalent equation

$$\begin{aligned} u_{n+4k}=\frac{u_n}{A_n+B_n\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}, \end{aligned}$$
(4)

for some arbitrary real sequences \(A_n\) and \(B_n\) where \(u_0, u_1, \ldots , u_{4k-1}\) are initial values. Using symmetries, we obtain explicit formulas for the solution of (4) and we deduce the solutions of (2) from those of (4). We also study the periodic nature of the solutions and a stability analysis of the difference equation is investigated.

The derivation of symmetries for higher order recurrences involves cumbersome calculations and, to the best of our knowledge, there are no computer packages that generate these symmetries. For more on Lie symmetry analysis of difference equations, the reader can refer to [9] and, among others, the articles [6, 7, 13].

1.1 Preliminaries

Consider the difference equation:

$$\begin{aligned} u_{n+4k}=\mathcal {G}(n,u_n,u_{n+4}, u_{n+8} \dots , u_{n+4k-4}), \end{aligned}$$
(5)

for some smooth function \(\mathcal {G}\) satisfying \({\partial \mathcal {G}}/{\partial u_{n}} \ne 0\). Symmetry groups are connected to the determination of infinitesimal transformations. Let

$$\begin{aligned} \hat{u}_{n}=u_n+ \varepsilon Q(n,u_{n})+O(\varepsilon ^2), \end{aligned}$$
(6)

be the one parameter Lie group of transformations of (5) with the corresponding generator

$$\begin{aligned} \mathcal {V}=Q(n,u_n)\frac{\partial \quad }{\partial u_n}. \end{aligned}$$
(7)

Note that the knowledge of the characteristic \(Q=Q(n,u_n)\) requires the knowledge of the \((4k-4)\)-th prolongation of \(\mathcal {V}\):

$$\begin{aligned} \mathcal {V}^{[4k-4]}=Q\frac{\partial \quad }{\partial u_{n}}+(S^4Q)\frac{\partial \quad }{\partial u_{n+4}}+\dots +(S^{4k-4}Q)\frac{\partial \quad }{\partial u_{n+4k-4}}, \end{aligned}$$
(8)

where \(S^i:n\rightarrow n+i\) is the forward shift operator. It is known that (6) is a symmetry group if and only if the condition

$$\begin{aligned} S^{4k}Q(n,u_{n})- \mathcal {V}^{[4k-4]}(\mathcal {G})=0 {\Big |}_{u_{n+5k}=\mathcal {G}(n,u_n,u_{n+4}, \dots , u_{n+4k-4})} \end{aligned}$$
(9)

holds. Suppose that the characteristic is obtained by solving the functional equation (9). One can use the canonical coordinate [10]

$$\begin{aligned} c_n= \int {\frac{\textrm{d}u_n}{Q(n,u_n)}} \end{aligned}$$
(10)

to derive the invariants which may be used to lower the order of the difference equations. In [9], the author attests that with the choice of canonical coordinate (10), the recurrence equation can, without fail, be represented in the form \(c_{n+1}-c_n=d_n\) whose solution takes the shape

$$\begin{aligned} c_n= \sum _{k=n_0}^{n}d_k+w_1 \end{aligned}$$
(11)

for some constant \(w_1\). From (11), it is not difficult to find the solution expressed in terms of the original variables. In this paper, our solution is obtained via the use of the canonical coordinate through a different methodology.

The following theorem and definitions [8] are useful for studying local and globally stability aspects of the equilibrium point.

Definition 1.1

The equilibrium point \(\bar{u}\) of (5) is said to be locally stable if for any \(\epsilon >0\) such that if \(\{ u_n\}_{n=0}^{\infty }\) is a solution of (5) with

$$\begin{aligned} |u_0-\bar{u}|+ |u_1-\bar{u}|+\dots + |u_{4k-2}-\bar{u}|+ |u_{4k-1}-\bar{u}|<\delta , \end{aligned}$$
(12)

then

$$\begin{aligned} |u_n-\bar{u}|<\epsilon \quad \text{ for } \text{ all } \quad n\ge 0. \end{aligned}$$
(13)

Definition 1.2

The equilibrium point \(\bar{u}\) of (5) is said to be a global attractor if for any solution \(\{ u_n\}_{n=0}^{\infty }\) of (5),

$$\begin{aligned} \lim _{n \leftarrow \infty } u_n =\bar{u}. \end{aligned}$$
(14)

Definition 1.3

The equilibrium point \(\bar{u}\) of (5) is globally asymptotically stable if \(\bar{u}\) is locally stable and is a global attractor of (5).

Let

$$\begin{aligned} p_i =\frac{\partial f}{\partial u_{n+i}}(\bar{u}, \dots , \bar{u}) , \quad i=4r, \quad r=0,1,\dots , k-1. \end{aligned}$$
(15)

It follows that

$$\begin{aligned} \lambda ^{4k}-p_{4k-4}\lambda ^{4k-4}-\dots -p_{4}\lambda ^{4}-p_0=0 \end{aligned}$$
(16)

is the corresponding characteristic equation of (5) about the equilibrium point \(\bar{u}\).

Theorem 1.4

Suppose f is a smooth function defined on some open neighborhood of \(\bar{u}\). Then the following statements are true:

  1. (i)

    The equilibrium point \(\bar{u}\) is locally asymptotically stable if all the roots of (16) have absolute value less than one.

  2. (ii)

    The equilibrium point \(\bar{u}\) is unstable if at least one root of (16) has absolute value greater than one.

Definition 1.5

The equilibrium point \(\bar{u}\) of (5) is called non-hyperbolic if there exists a root of (16) with absolute value equal to one.

2 Lie analysis and solutions

To derive the characteristic function Q admitted by (4), that is,

$$\begin{aligned} u_{n+4k}=\mathcal {G}=\frac{u_n}{A_n+B_n\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}, \end{aligned}$$
(17)

we apply the symmetry constraint equation (9) to (17) to get

$$\begin{aligned}&Q(n+4k, u_{n+4k})-\sum _{i=0}^{k-1} \mathcal {G}_ {,u_{n+4i}}Q(n+4i, u_{n+4i})=0, \end{aligned}$$
(18)

where \(f_{,x}\) denotes the partial derivative of f with respect to x. To solve for Q, we first apply the differential operator \({\partial }/{\partial u_{n+4}}-({u_{n+8}}/{u_{n+4}}){\partial }/{\partial u_{n+8}}\) on (18). This gives

(19)

which simplifies to

$$\begin{aligned}&u_{n+8}Q(n+4, u_{n+4})-u_{n+4}Q(n+8, u_{n+8})+u_{n+4}u_{n+8}(Q'(n+8,u_{n+8})-Q'(n+4,u_{n+4}))=0. \end{aligned}$$
(20)

We then differentiate the above equation with respect to \(u_{n+4}\) twice to get

$$\begin{aligned} \left( u_{n+4}Q'(n+4,u_{n+4})-Q(n+4, u_{n+4})\right) ''=0. \end{aligned}$$
(21)

The general solution of (21) takes the form

$$\begin{aligned} Q(n,u_{n})=\alpha _nu_n+\beta _n (u_n\ln u_n +u_n) +\gamma _n \end{aligned}$$
(22)

for some functions \(\alpha _n\), \(\beta _n\) and \(\gamma _n\) of n. Next, we substitute Q and its corresponding shifts in (18). Bearing in mind that \(\alpha _n\), \(\beta _n\) and \(\gamma _n\) are independent of \(u_{n}\) and their shifts, we use the method of separation. It turns out that \(\beta _n\) is equal to zero and the system of overdetermined equations resulting from the separation is as follows:

$$\begin{aligned} 1&: A_n^2\gamma _{n+4k} -A_n \gamma _n =0\nonumber \\ u_n&:A_n\alpha _{n+4k}-A_n\alpha _n =0\nonumber \\ u_n^2u_{n+4}\dots u_{n+4k-4}&: B_n(\alpha _{n+4k}+\alpha _{n+4}+\alpha _{n+8}+\dots +\alpha _{n+4k-8}+\alpha _{n+4k-4})=0\nonumber \\ u_nu_{n+4}\dots u_{n+4k-4}&:2A_nB_n\gamma _{n+4k}=0 \end{aligned}$$
(23)

which reduces to

$$\begin{aligned}&\gamma _n =0, \quad \alpha _{n+4k}-\alpha _n =0, \end{aligned}$$
(24)
$$\begin{aligned}&\alpha _{n}+\alpha _{n+4}+\alpha _{n+8}+\dots +\alpha _{n+4k-8}+\alpha _{n+4k-4}=0. \end{aligned}$$
(25)

Equation (25) is a linear difference equation with constant coefficients and has the characteristic equation

$$\begin{aligned} 1+r^{4}+r^{8}+\dots +r^{4k-8}+r^{4k-4}=0. \end{aligned}$$
(26)

It is well known that if r is a solution of (26), then \(\alpha _n = r^n\) is a solution of (25). Multiplying (26) by \(1-r^4\) and solving the resulting equation gives

$$\begin{aligned} r_1(s)=e^{\frac{is\pi }{2k}},\quad r_2(s)=-e^{\frac{is\pi }{2k}},\quad r_3(s)=ie^{\frac{is\pi }{2k}},\quad r_4(s)=-ie^{\frac{is\pi }{2k}}, \end{aligned}$$
(27)

for \( 1\le s\le k-1.\) Thus, from (22), the finite dimensional Lie algebra is spanned by the vectors fields

$$\begin{aligned} X_{1}(s)&=e^{\frac{ins\pi }{2k}} u_{n}{\frac{\partial \quad }{\partial u_{n}}},\;X_{2}(s)=(-1)^ne^{\frac{ins\pi }{2k}} u_{n}{\frac{\partial \quad }{\partial u_{n}}}, \end{aligned}$$
(28)
$$\begin{aligned} X_{3}(s)&=i^ne^{\frac{ins\pi }{2k}} u_{n}{\frac{\partial \quad }{\partial u_{n}}},\;X_{4}(s)=(-i)^ne^{\frac{ins\pi }{2k}} u_{n}{\frac{\partial \quad }{\partial u_{n}}} \end{aligned}$$
(29)

for \( 1\le s\le k-1.\) To obtain the compatible variable, we use the canonical coordinate

$$\begin{aligned} C(n)= \int \frac{\textrm{d}u_n}{\alpha _n u_{n}}=\frac{1}{\alpha _n}\ln |u_n|, \end{aligned}$$
(30)

where \(\alpha _n\) satisfies (25). Replacing \(\alpha _n\) with \(C(n)\alpha _n\) in the left hand side of equation in (25) yields the group invariant \(I_n=\ln |u_nu_{n+4}\dots u_{n+4k-4}|\) since \((X_r(s)) I_n =0\) for \(r=1, 2, 3, 4\). Hence, using (17), we have \(e^{-I_{n+4}}={A_ne^{-I_n}}+ B_n\). For the sake of simplicity, we instead use the invariant

$$\begin{aligned} r_n=\exp {(-I_n)}=\frac{1}{u_nu_{n+4}\dots u_{n+4k-4}}. \end{aligned}$$
(31)

On one hand, shifting (31) four times and replacing \(u_{n+4k}\) in the resulting equation yields

$$\begin{aligned} r_{n+4}=A_n{r_n}+ A_n \end{aligned}$$
(32)

whose iteration gives

$$\begin{aligned} r_{4n+j}=r_j\left( \prod \limits _{k_1=0}^{n-1}A_{4k_1+j}\right) + \sum \limits _{l=0}^{n-1}\left( B_{4l+j}\prod \limits _{k_2=l+1}^{n-1} A_{4k_2+j}\right) \end{aligned}$$
(33)

for \( j=0,1,2,3\). On the other hand, using the same relation given in (31), we have

$$\begin{aligned} u_{n+4k}= \frac{r_n}{r_{n+4}}u_n. \end{aligned}$$
(34)

We iterate (34) and its solution in closed form takes the form

$$\begin{aligned} u_{4kn+i}= u_i \left( \prod \limits _{s=0}^{n-1}\frac{r_{4ks+i}}{r_{4ks+4+i}}\right) , \quad i=0,\dots , 4k-1. \end{aligned}$$
(35)

From the known fact that any integer r can be written as \(r=4\lfloor r/4\rfloor +\tau (r), \; 0\le \tau (r)\le 3\), where \(\tau (r)\) is the remainder when r is divided by 4, we can rewrite (35) as follows:

$$\begin{aligned} u_{4kn+i}= u_i \left( \prod \limits _{s=0}^{n-1}\frac{r_{4(ks+\lfloor \frac{i}{4}\rfloor )+\tau (i)}}{r_{{4(ks+\lfloor \frac{i+4}{4}\rfloor )+\tau (i+4)}}}\right) , \end{aligned}$$
(36)

where \(i=0,\dots , 4k-1\) and \(0\le \tau (i)\le 3\). Using (35) in (36), we obtain

$$\begin{aligned} u_{4kn+i}=&u_i \prod \limits _{s=0}^{n-1}\frac{r_{\tau (i)}\left( \prod \nolimits _{k_1=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}A_{4k_1+\tau (i)}\right) + \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}\left( B_{4l+\tau (i)}\prod \nolimits _{k_2=l+1}^{\begin{array}{c} ks\\ +\lfloor \frac{i}{4}\rfloor -1 \end{array}} A_{4k_2+\tau (i)}\right) }{r_{\tau (i+4)}\left( \prod \nolimits _{k_1=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i+4}{4}\rfloor -1 \end{array}}A_{4k_1+\tau (i+4)}\right) + \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i+4}{4}\rfloor -1 \end{array}}\left( B_{4l+\tau (i+4)}\prod \nolimits _{k_2=l+1}^{\begin{array}{c} ks+\\ \lfloor \frac{i+4}{4}\rfloor -1 \end{array}} A_{4k_2+\tau (i+4)}\right) }, \end{aligned}$$
(37)

\(i=0,\dots , 4k-1\). Noting that \(\tau (i+4)=\tau (i)\) and \(1/r_i=\prod _{j=0}^{k-1}{u_{i+4j}}\), the above equation simplifies

$$\begin{aligned} u_{4kn+i}=&u_i \prod \limits _{s=0}^{n-1}\frac{\left( \prod \nolimits _{k_1=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}A_{4k_1+\tau (i)}\right) + \left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}\left( B_{4l+\tau (i)}\prod \nolimits _{k_2=l+1}^{\begin{array}{c} ks\\ +\lfloor \frac{i}{4}\rfloor -1 \end{array}} A_{4k_2+\tau (i)}\right) }{\left( \prod \nolimits _{k_1=0}^{\begin{array}{c} ks+\lfloor \frac{i}{4}\rfloor \end{array}}A_{4k_1+\tau (i)}\right) + \left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\lfloor \frac{i}{4}\rfloor \end{array}}\left( B_{4l+\tau (i)}\prod \nolimits _{k_2=l+1}^{\begin{array}{c} ks+\lfloor \frac{i}{4}\rfloor \end{array}} A_{4k_2+\tau (i)}\right) }, \end{aligned}$$
(38)

\(i=0,\dots , 4k-1\). The solution of (2) is obtained by back shifting (38) \(4k-1\) times. Hence, the closed form solution of (2) is given by

(39)

Observe that if \(\{a_n\}\) and \(\{b_n\}\) are constant sequences, i.e. \(a_n = a\) for all n and \(b_n = b\) for all n, then the solutions of (2) and (4) are given by

$$\begin{aligned} \eta _{4kn-4k+1+i} =&\eta _{i-4k+1} \prod \limits _{s=0}^{n-1}\frac{ a^{ks+ \lfloor \frac{i}{4}\rfloor } + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}a^l}{a^{ks+ \lfloor \frac{i}{4}\rfloor +1} +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\lfloor \frac{i}{4}\rfloor \end{array}}a^l} \end{aligned}$$
(40)

and

$$\begin{aligned} u_{4kn+i}=&u_i \prod \limits _{s=0}^{n-1}\frac{A^{ks+ \lfloor \frac{i}{4}\rfloor } + B\left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}A^l}{A^{ks+ \lfloor \frac{i}{4}\rfloor +1} + B\left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor \end{array}}A^l}, \end{aligned}$$
(41)

respectively.

In the following section, we investigate some special cases. One of the aims is to realize some results in [1].

3 Special cases

3.1 The case when \(a = 1\) and b is a constant

We investigate the case when \(a = 1\) and b constant. In this case, from (40), the solution is given by

$$\begin{aligned} \eta _{4kn-4k+1+i} =&\eta _{i-4k+1} \prod \limits _{s=0}^{n-1}\frac{1 + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) (ks+\lfloor \frac{i}{4}\rfloor )}{1 +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) (ks+\lfloor \frac{i}{4}\rfloor +1)}, \end{aligned}$$
(42)

\(i=0,\dots , 4k-1\). Replacing \(b=\pm 1\) in (42) yields the results in [1, see Theorems 1 and 6]. In fact, noting that \(\tau (4k-1-j)=3-\tau (j)=3-j+4\lfloor j/4\rfloor \), we have:

$$\begin{aligned} \eta _{4kn-j}&= \eta _{4kn-4k+1+(4k-1-j)},\qquad j=0, 1, \dots , 4k-1 \end{aligned}$$
(43)
$$\begin{aligned}&= \eta _{-j} \prod \limits _{s=0}^{n-1}\frac{1 + b\left( \prod \nolimits _{r=0}^{k-1}{\eta _{\tau (4k-1-j)-4k+1+4r}}\right) (ks+\lfloor \frac{4k-1-j}{4}\rfloor )}{1 +b \left( \prod \nolimits _{r=0}^{k-1}{\eta _{\tau (4k-1-j)-4k+1+4r}}\right) (ks+\lfloor \frac{4k-1-j}{4}\rfloor +1)} \end{aligned}$$
(44)
$$\begin{aligned}&= \eta _{-j} \prod \limits _{s=0}^{n-1}\frac{1 + b\left( \prod \nolimits _{r=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) (ks+k-1-\lfloor \frac{j}{4}\rfloor )}{1 +b \left( \prod \nolimits _{r=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) (ks+k-\lfloor \frac{j}{4}\rfloor )}. \end{aligned}$$
(45)

3.2 The case when \(a \ne 1\) and b is a constant

Here, from (40), the solution is given by

$$\begin{aligned} \eta _{4kn-4k+1+i} =&\eta _{i-4k+1} \prod \limits _{s=0}^{n-1}\frac{a^{ks+\lfloor \frac{i}{4}\rfloor } + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) \left( \frac{1-a^{ks+\lfloor \frac{i}{4}\rfloor }}{1-a}\right) }{a^{ks+\lfloor \frac{i}{4}\rfloor +1} +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{\tau (i)-4k+1+4j}}\right) \left( \frac{1-a^{ks+\lfloor \frac{i}{4}\rfloor +1}}{1-a}\right) } \end{aligned}$$
(46)

and, similarly, this can also be written in the form

$$\begin{aligned} \eta _{4kn-j} =&\eta _{-j} \prod \limits _{s=0}^{n-1}\frac{a^{ks+k-1-\lfloor \frac{i}{4}\rfloor } + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1-a^{ks+k-1+\lfloor \frac{i}{4}\rfloor }}{1-a}\right) }{a^{ks+k-\lfloor \frac{i}{4}\rfloor } +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1-a^{ks+k-\lfloor \frac{i}{4}\rfloor }}{1-a}\right) }. \end{aligned}$$
(47)

For \(a=-1\), the above equation simplifies to

  • For k even,

    $$\begin{aligned} \eta _{4kn-j}&= \eta _{-j} \prod \limits _{s=0}^{n-1}\frac{-(-1)^{\lfloor \frac{i}{4}\rfloor } + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1+(-1)^{\lfloor \frac{i}{4}\rfloor }}{2}\right) }{(-1)^{\lfloor \frac{i}{4}\rfloor } +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1-(-1)^{\lfloor \frac{i}{4}\rfloor }}{2}\right) } \end{aligned}$$
    (48)
    $$\begin{aligned}&= \eta _{-j}\left[ -1+b\left( \prod \limits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \right] ^{(-1)^{\lfloor \frac{j}{4}\rfloor }n}. \end{aligned}$$
    (49)

    This result was obtained in [1] for \(b=\pm 1\) (see Theorems 11 and 18).

  • For k odd,

    $$\begin{aligned} \eta _{4kn-j}&= \eta _{-j} \prod \limits _{s=0}^{n-1}\frac{(-1)^{s-\lfloor \frac{i}{4}\rfloor } + b\left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1-(-1)^{s-\lfloor \frac{i}{4}\rfloor }}{2}\right) }{-(-1)^{s-\lfloor \frac{i}{4}\rfloor } +b \left( \prod \nolimits _{j=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) \left( \frac{1+(-1)^{s-\lfloor \frac{i}{4}\rfloor }}{2}\right) } \end{aligned}$$
    (50)
    $$\begin{aligned}&= {\left\{ \begin{array}{ll} \eta _{-j}, \quad \text {if}\, n\,\text { is even } \\ \eta _{-j}\left[ {-1+b\left( \prod \limits _{r=0}^{k-1}{\eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}}\right) }\right] ^{(-1)^{\lfloor \frac{j}{4}\rfloor +1}}, \text { if}\, n\,\text { is odd} \end{array}\right. } \end{aligned}$$
    (51)

    for \(j=0, 1, \dots , 4k-1\) and furthermore,

    $$\begin{aligned} \eta _{8kn-j}&= \eta _{-j} \end{aligned}$$
    (52)

    for all n. More explicitly, the 8k periodic solutions are as follows:

    $$\begin{aligned} \eta _{i}&= \eta _{4k(1)-(4k-i)}=\frac{\eta _{-4k+i}}{\left[ {-1+b\left( \prod \nolimits _{r=0}^{k-1}{\eta _{-4(r+1)+i}}\right) }\right] },i=1,2,3,4 \end{aligned}$$
    (53)
    $$\begin{aligned} \eta _{4+i}&= \eta _{4k(1)-(4k-i-4)}={\eta _{-4k+i+4}}{\left[ {-1+b\left( \prod \limits _{r=0}^{k-1}{\eta _{-4(r+1)+i}}\right) }\right] }, i=1,2,3,4 \end{aligned}$$
    (54)
    $$\begin{aligned} \vdots&\qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots \nonumber \\ \eta _{4k-8+i}&= \eta _{4k(1)-(8-i)}={\eta _{8-i}}{\left[ {-1+b\left( \prod \limits _{r=0}^{k-1}{\eta _{-4(r+1)+i}}\right) }\right] }, i=1,2,3,4 \end{aligned}$$
    (55)
    $$\begin{aligned} \eta _{4k-4+i}&= \eta _{4k(1)-(4k-i-4)}=\frac{\eta _{-4k+i+4}}{\left[ {-1+b\left( \prod \nolimits _{r=0}^{k-1}{\eta _{-4(r+1)+i}}\right) }\right] },\quad i=1,2,3,4 \end{aligned}$$
    (56)
    $$\begin{aligned} \eta _{4k+1+i}&= \eta _{4k(2)-(4k-1-i)}=\eta _{-4k+1+i},\quad i=0, 1, \dots , 4k-1. \end{aligned}$$
    (57)

    For this special case, the results were obtained in [1] for \(b=\pm 1\) (see Theorems 9, 15 and 16).

4 Periodicity and behavior of the solutions

Theorem 4.1

Let \(u_n\) be a solution of

$$\begin{aligned} u_{n+4k}=\frac{u_n}{A+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}, \end{aligned}$$
(58)

for some non-zero constants \(A\ne 1\) and B. Suppose the initial conditions \(x_i, \; i=0,\dots , 4k-1\), are such that \(\prod _{j=0}^{k-1} u_{4j+p}=(1-A)/B\), \(p=0, 1, 2, 3\). Then the solution of (58) is periodic with period 4k.

Proof

Suppose \(\prod \nolimits _{j=0}^{k-1} u_{4j+p}=(1-A)/B\), \(p=0, 1, 2, 3\). From (41), we get

$$\begin{aligned} u_{4kn+i}&= u_i \prod \limits _{s=0}^{n-1}\frac{A^{ks+ \lfloor \frac{i}{4}\rfloor } +B \left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\\ \lfloor \frac{i}{4}\rfloor -1 \end{array}}A^l}{A^{ks+ \lfloor \frac{i}{4}\rfloor +1} + B\left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \sum \nolimits _{l=0}^{\begin{array}{c} ks+\lfloor \frac{i}{4}\rfloor \end{array}}A^l} \end{aligned}$$
(59)
$$\begin{aligned}&= u_i \prod \nolimits _{s=0}^{n-1}\frac{A^{ks+ \lfloor \frac{i}{4}\rfloor } +B \left( \frac{1-A}{B}\right) \left( \frac{1-A^{ks+\lfloor \frac{i}{4}\rfloor }}{1-A}\right) }{A^{ks+ \lfloor \frac{i}{4}\rfloor +1} + B\left( \frac{1-A}{B}\right) \left( \frac{1-A^{ks+\lfloor \frac{i}{4}\rfloor +1}}{1-A}\right) } \end{aligned}$$
(60)
$$\begin{aligned}&= u_i, \end{aligned}$$
(61)

for all \(i=0,1, \dots , 4k-1\) since \(0\le \tau (i)\le 3\). \(\square \)

Fig. 1
figure 1

Graph of \(x_{n+8} = \dfrac{x_n}{(2-x_nx_{n+4})}\), where \(x_0=-2,x_1=-3, x_2=-4, x_3=1, x_4=-1/2, x_5=-1/3, x_6=-1/4, x_7=1\) and are such that \(x_0x_4=x_1x_5=x_2x_6=x_3x_7=(1-A)/B\)

We plot Fig. 1 to illustrate Theorem 4.1. We note that for \(A=-1\) and \(B=1\), we get the result in Theorem 13 in [1] and the result’s restriction (\(\prod _{r=0}^{k-1} \eta _{-j+4\lfloor \frac{j}{4}\rfloor -4r}=2, j=0, 1, \dots , 4k-1\) or simply \(-j+4\lfloor \frac{j}{4}\rfloor =0, 1, 2, 3\)) is a special case of the assumption in the above theorem (\(\prod _{j=0}^{k-1} u_{4j+p}=(1-A)/B\), that is, \(\prod _{r=0}^{k-1} \eta _{p-4r\lfloor \frac{j}{4}\rfloor -4r}=(1-A)/B, p=0, 1, 2, 3\)).

Observe that in Theorem 15 in [1], the authors ought to add the restriction \(v_j\ne -2\). If this condition is not satisfied, the period will be 4k and not 8k as they clearly stated in Theorem 20 in [1].

Theorem 4.2

Let \(u_n\) be a solution of

$$\begin{aligned} u_{n+4k}=\frac{u_n}{1+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}, \end{aligned}$$
(62)

for some non-zero constant B. The zero equilibrium point is non hyperbolic. Furthermore, if the initial conditions \(x_i, \; i=0,\dots , 4k-1\), and B are positive, then the solution converges to the zero equilibrium point.

Proof

The equilibrium point of (62) is \(u=0\). Let

$$\begin{aligned} f(u_n, u_{n+4}, \dots , u_{n+4(k-1)})= u_{n+4k}=\frac{u_n}{1+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}. \end{aligned}$$
(63)

So,

$$\begin{aligned} f_{,u_n}=\frac{1}{\left( 1+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}\right) ^2}, \quad f_{,u_{n+4j}}=\frac{-Bu_n^2}{\left( 1+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}\right) ^2} \prod \nolimits _{\begin{array}{c} i=1\\ i\ne j \end{array}}^{k-1} u_{n+4i},\quad j=1,2,\dots , k-1. \end{aligned}$$
(64)

We have \( f_{,u_n}(0,0,\dots ,0)=1\) and \(f_{,u_{n+4j}}(0,0,\dots ,0)=0, j=1,2,\dots , k-1\). Thus, the characteristic equation associated with (58) is \(\lambda ^{4k}-1=0\) and therefore, \(|\lambda _i|=1\). Therefore, the zero equilibrium point is non-hyperbolic.

Suppose the non-zero initial conditions are all positive. From (41), we get

$$\begin{aligned} u_{4kn+i}&= u_i \prod \limits _{s=0}^{n-1}\frac{1+B \left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \left( ks+\left\lfloor \frac{i}{4}\right\rfloor \right) }{1 + B\left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \left( ks+\left\lfloor \frac{i}{4}\right\rfloor +1\right) } \end{aligned}$$
(65)
$$\begin{aligned}&= u_i \prod \limits _{s=0}^{n-1}\left( 1- \frac{B \left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) }{1 + B\left( \prod \nolimits _{j=0}^{k-1}{u_{\tau (i)+4j}}\right) \left( ks+\left\lfloor \frac{i}{4}\right\rfloor +1\right) }\right) \end{aligned}$$
(66)
$$\begin{aligned}&= u_i \prod \limits _{s=0}^{n-1} \Theta (s).\end{aligned}$$
(67)

If B is positive, \(\Theta (s)<1\), \(s=0, 1, \dots , n-1\). Therefore, \(u_{n}\) tends to zero as n tends to infinity. \(\square \)

Fig. 2
figure 2

Graph of \(x_{n+8} = {x_n}/{(2+x_nx_{n+4})}\), where \(x_0=2,x_1=3, x_2=4, x_3=1, x_4=1/2, x_5=1/3, x_6=1/4, x_7=1\)

We plot Fig. 2 to illustrate Theorem 4.2.

Theorem 4.3

Assume that B is positive and \(u_i\ge 0, i=0, 1, \dots , k-1\).Then the zero equilibrium point \(u=0\) of (62) is globally asymptotically stable.

Proof

The equilibrium point of (62) satisfies \(u(1+Bu^k)=0\). Thus, \(u=0\). Let \(\epsilon \ge 0\) and suppose the \(u_i's, i=0, 1, \dots , k-1\) are such that

$$|u_i|\le \frac{\epsilon }{4k(B+1)}, i=0, 1, \dots , k-1.$$

We have that

$$\begin{aligned} |u_0|+|u_{1}|+\dots +|u_{k-1}|\le \frac{\epsilon }{B+1}\end{aligned}$$
(68)

and (see (67)),

$$\begin{aligned} u_{4kn+i}\le u_i, \end{aligned}$$
(69)

\(i=0,1,\dots ,k-1\), for all n if \(B\ge 0\).

This implies that for \(|u_{4kn+i}|\le |u_i|\le \frac{\epsilon }{4k(B+1)}\le \epsilon \), we have found \(\delta = {\epsilon }/{(B+1)}\) such that \(|u_0|+|u_{1}|+\dots |u_{k-1}|\le \delta \). Thus, the zero equilibrium point is locally stable. On the other hand (see Theorem 4.2), \(x_n\) tends to zero as n goes to infinity. The zero equilibrium being a global attractor and locally stable, it is globally asymptotically stable. \(\square \)

Theorem 4.4

Assume \(A\ne 1\). The zero equilibrium point of (58) is asymptotically stable for \(|A|> 1\) and unstable for \(|A|< 1\). Furthermore, all non zero equilibrium points of (58) are non-hyperbolic.

Proof

The equilibrium points of (58) satisfy \(u(A+Bu^k-1)=0\). Let

$$\begin{aligned} f(u_n, u_{n+4}, \dots , u_{n+4(k-1)})= u_{n+4k}=\frac{u_n}{A+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}}.\end{aligned}$$
(70)

We have

$$\begin{aligned} f_{,u_n}=\frac{A}{\left( A+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}\right) ^2}, \quad f_{,u_{n+4j}}=\frac{-Bu_n^2}{\left( A+B\prod \nolimits _{i=1}^{k} u_{n+4(i-1)}\right) ^2} \prod \limits _{\begin{array}{c} i=1\\ i\ne j \end{array}}^{k-1} u_{n+4i},\quad j=1,2,\dots , k-1. \end{aligned}$$
(71)
  • For the equilibrium point \(u=0\), we have \( f_{,u_n}(0,0,\dots ,0)=1/A\) and \(f_{,u_{n+4j}}(0,0,\dots ,0)=0, j=1,2,\dots , k-1\). Thus, the characteristic equation associated with (58) is \(\lambda ^{4k}-\frac{1}{A}=0.\) Therefore, \(|\lambda |< 1\) if \(|A|> 1\) (that is, locally asymptotically stable) and \(|\lambda |> 1\) if \(|A|< 1\) (that is, unstable).

  • The non-zero equilibrium points u satisfy \(A+Bu^k-1=0\). Then \(f_{,u_n}(u,u,\dots ,u)=A\) and \(f_{,u_{n+4j}}(u,u,\dots ,u)=A-1, j=1,2,\dots , k-1\). Thus, the characteristic equation associated with (58) is

    $$\begin{aligned} \lambda ^{4k}-(A-1)\lambda ^{4k-4}-\dots -(A-1)\lambda ^4 -A=0. \end{aligned}$$
    (72)

    Multiplying the above equation by \(1-\lambda ^4\), we get (after simplification)

    $$\begin{aligned} (1-\lambda ^{4k})(\lambda ^4-A)=0.\end{aligned}$$
    (73)

    It follows that, for \(A< 0\), the solutions of (73) are \(\lambda _r=-Ae^{i\frac{i(2r+1)\pi }{4}},\; r=0,1,2,3\) or \(\lambda _r =e^{i\frac{2r\pi }{4k}}, p= 1,2,\dots , k-1, k+1, \dots , 2k-1,2k+1,\dots ,2k-1, 2k+1,\dots ,3k-1,3k+1,\dots , 4k-1.\) For \(A>0\), the solutions of (73) are \(\lambda _r=Ae^{i\frac{2r\pi }{4}},\; r=0,1,2,3\) or \(\lambda _r =e^{i\frac{2r\pi }{4k}}, p= 1,2,\dots , k-1, k+1, \dots , 2k-1,2k+1,\dots ,2k-1, 2k+1,\dots ,3k-1,3k+1,\dots , 4k-1.\) Therefore, for \(k>1\), there exists a root of (72) with modulus equal to one.

\(\square \)

5 Conclusion

We studied the difference equation \(\eta _{n+1}={\eta _{n-4k+1}}/{(a_n +b_n \prod _{i=1}^{k} \eta _{n-4i+1})}\) by performing its symmetry analysis and we used the canonical coordinate to obtain its invariants. These invariants are utilized to derive the solutions in closed form. We demonstrated that all the formula solutions in [1] are special cases of our findings. Some conditions for existence of 4k and 8k periodic solutions were established. Finally, we investigated the stability of the solution of the difference equation and proved the existence of non-hyperbolic and globally asymptotically stable equilibrium points.