1 Introduction

Let \({\mathbb {N}}\), \({\mathbb {Z}}\), \({\mathbb {R}}\), \({\mathbb {C}}\) be the sets of natural, whole, real, and complex numbers, respectively, and \({\mathbb {N}}_{0}={\mathbb {N}}\cup \{0\}\). If \(k,l\in {\mathbb {Z}}\), then \(j=\overline{k,l}\) stands for the set of all \(j\in {\mathbb {Z}}\) such that \(k\le j\le l\).

Finding closed-form formulas for solutions to difference equations is one of the basic problems in the area. The equation

$$\begin{aligned} y_{n+2}=ay_{n+1}+by_{n},\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(1)

when \(b\ne 0\) and \(a^{2}+4b\ne 0\), was solved by de Moivre in [1] (see also [2]). He found a formula for solution to equation (1), which is called the de Moivre formula for solutions to linear homogeneous second-order difference equation with constant coefficients, which is one of the first nontrivial results on solvability of difference equations. Before it, some special cases of equation (1) had been solved in [3].

These results attracted some attention, and soon after that Bernoulli in [4] found another method for solving linear difference equations with constant coefficients. A presentation of some old results on solvability can be found in [5]. For some later results see [6, 7], as well as [8], where many classes of difference equations and systems were solved. For some twentieth century presentations of the theory, see, for example, [913]. Some recent results on solvability of difference equations and systems have been obtained and guessed by computer packages for symbolic calculations. They can help in getting or guessing some closed-form formulas for solutions to the equations and systems, but using only such tools could also produce some issues (see some comments, e.g., in [1417]). This has been one of the reasons which motivated us to conduct more serious investigations on solvability of difference equations and systems. Recent investigations show that still a great majority of papers on solvability use some substitutions of various complexity, which transform difference equations and systems to known solvable ones (see, for example, [14, 1826] and the references therein). It should be mentioned that solvable difference equations and systems have many applications (see, e.g., [2, 4, 710, 12, 2729]). For invariants for difference equations and systems, and their applications in solvability, see, for example, [3035].

Recently, solvability of the so-called hyperbolic-cotangent-type difference equations, as well as of the corresponding systems of difference equations, has been studied (see [2226]). The difference equations and systems therein resemble the hyperbolic-cotangent sum formula which has been a good hint for solvability of the equations and systems. Generally speaking, the difference equations and systems which resemble some trigonometric or hyperbolic trigonometric formulas are natural candidates to be solvable. This is an observation known to mathematicians for a long time.

Now, as a motivation for the study, we present a known example along with the most important details related to solvability of the equation in the example.

Example 1

The following difference equation

$$\begin{aligned} x_{n+1}=x_{n}^{2}-2,\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(2)

was already known to Laplace [8]. He noticed that equation (2) is solvable. Namely, if \(x_{0}\in {\mathbb {C}}\), then there is \(a\in {\mathbb {C}}\setminus \{0\}\) such that

$$\begin{aligned} x_{0}=a+\frac{1}{a} \end{aligned}$$
(3)

(see, e.g., [36]).

By using (3) in (2), then repeating the procedure, he noticed that

$$\begin{aligned}& x_{1}= \biggl(a+\frac{1}{a} \biggr)^{2}-2=a^{2}+ \frac{1}{a^{2}}, \\& x_{2}= \biggl(a^{2}+\frac{1}{a^{2}} \biggr)^{2}-2=a^{4}+ \frac{1}{a^{4}}, \\& x_{3}= \biggl(a^{4}+\frac{1}{a^{4}} \biggr)^{2}-2=a^{8}+ \frac{1}{a^{8}}, \end{aligned}$$

and concluded

$$\begin{aligned} x_{n}=a^{2^{n}}+\frac{1}{a^{2^{n}}},\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(4)

which is easily proved by induction. Laplace did not conduct further analysis of solutions to equation (2).

In what follows we mention several simple folklore things related to solvability of the equation in the case when \(x_{0}\) is a real number. If \(x_{0}\ge 2\), then \(x_{0}\) can be written in the form given in (3) for some \(a>0\). For \(x_{0}=2\), we have \(x_{1}=2\), and by the method of induction, constant solution \(x_{n}=2\) for every \(n\in {\mathbb {N}}_{0}\) is easily obtained. In this case there is unique a such that (3) holds, namely \(a=1\). If \(x_{0}>2\), then there are two positive values of a such that (3) holds. They are the roots of the quadratic polynomial \(t^{2}-x_{0}t+1\), that is,

$$\begin{aligned} a_{1,2}=\frac{x_{0}\pm \sqrt{x_{0}^{2}-4}}{2}. \end{aligned}$$
(5)

If one of the numbers \(a_{1,2}\) is denoted by a, by the Viète formulas, we see that the second one is \(1/a\). So, since formula (4) is invariant under the transformation \(a\to 1/a\), whichever of these two numbers is used, the formula is always obtained.

By combining (4) and (5), we see that the solution to equation (2) in this case can be written as follows:

$$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{2^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-2^{n}},\quad n\in {\mathbb {N}}_{0}. $$

If \(x_{0}\le -2\), then \(x_{1}=x_{0}^{2}-2\ge 2\). This means that this case is reduced to the previous one. Namely, if

$$\begin{aligned} x_{0}^{2}-2=x_{1}=b+\frac{1}{b} \end{aligned}$$
(6)

for some \(b>0\), then

$$\begin{aligned} x_{n}=b^{2^{n-1}}+\frac{1}{b^{2^{n-1}}},\quad n\in {\mathbb {N}}. \end{aligned}$$
(7)

From (6) we have \(b^{2}-(x_{0}^{2}-2)b+1=0\), so that

$$ b_{1,2}=\frac{x_{0}^{2}-2\pm \vert x_{0} \vert \sqrt{x_{0}^{2}-4}}{2}, $$

and \(b_{1}=1/b_{2}\). Using this in (7), we get

$$\begin{aligned} x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{2^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-2^{n-1}}, \quad n\in {\mathbb {N}}. \end{aligned}$$
(8)

If \(a>0\), note that (4) can be written in the following form:

$$\begin{aligned} x_{n}=e^{2^{n}\ln a}+\frac{1}{e^{2^{n}\ln a}}=2\cosh \bigl(2^{n} \ln a\bigr)=2 \cosh \bigl(2^{n}\widehat{a}\bigr),\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(9)

where \(\widehat{a}=\ln a\). This means that if \(x_{0}=2\cosh \widehat{a}\), then \(x_{n}=2\cosh (2^{n}\widehat{a})\), \(n\in {\mathbb {N}}_{0}\).

Bearing in mind the form of formula (9), we see that equation (2) is closely related to the hyperbolic cosine function. This connection is not so strange at all. Namely, by using the change of variables \(x_{n}=2\tilde{x}_{n}\), \(n\in {\mathbb {N}}_{0}\), in equation (2), it is transformed to the following one:

$$ \tilde{x}_{n+1}=2\tilde{x}_{n}^{2}-1,\quad n\in {\mathbb {N}}_{0}, $$

which resembles the formula

$$ \cosh 2x=2\cosh ^{2} x-1. $$

Because of this, it is natural to say that equation (2) in the case \(\vert x_{0} \vert \ge 2\) is an example of hyperbolic-cosine-type difference equations.

If \(x_{0}\in [-2,2]\), then \(x_{0}\) can be written in the form given in (3) for some \(a=e^{i\theta }\), where \(\theta \in [0,2\pi )\). In this case we have \(x_{0}=2\cos \theta \), whereas from (4) we get

$$ x_{n}=2\cos \bigl(2^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$

Hence, in the case \(x_{0}\in [-2,2]\), equation (2) is an example of cosine-type difference equations.

A natural problem is to try to find related hyperbolic-cosine-type difference equations, which are also solvable. This problem seems classical one, but we could not find a complete solution to the problem in the literature so far. Beside this, it is good to have all the things, some of which seem scattered in the literature, in the same place. Hence, we consider here the problem in detail. We show that there is a natural sequence of hyperbolic-cosine-type difference equations which are solvable in closed form and describe a simple constructive way for obtaining the sequence of equations.

2 A basic class of solvable hyperbolic-cosine-type difference equations

In this section we explain how a natural class/sequence of hyperbolic-cosine-type difference equations related to equation (2) is obtained, which are also solvable.

2.1 Basic ideas and equations

First, note that the main thing connected to solvability of equation (2) is the fact that the following relation holds:

$$\begin{aligned} a^{2}+\frac{1}{a^{2}}= \biggl(a+\frac{1}{a} \biggr)^{2}-2 \end{aligned}$$
(10)

for every \(a\in {\mathbb {C}}\setminus \{0\}\), which is a simple, but no doubt very useful, relation between the quantities

$$ I_{k}:=a^{k}+\frac{1}{a^{k}} $$

for \(k=1\) and \(k=2\).

The consideration in Example 1 suggests that if we can express the quantity \(I_{3}\) in terms of \(I_{1}\) in a similar way, then we can obtain another solvable difference equation. It is not difficult to see that such a relation exists. Namely, we have

$$\begin{aligned} \biggl(a+\frac{1}{a} \biggr)^{3}=a^{3}+ \frac{1}{a^{3}}+3 \biggl(a+\frac{1}{a} \biggr) \end{aligned}$$
(11)

for every \(a\in {\mathbb {C}}\setminus \{0\}\).

Let the sequence \((x_{n})_{n\in {\mathbb {N}}_{0}}\) be a solution to the following difference equation:

$$\begin{aligned} x_{n+1}=x_{n}^{3}-3x_{n},\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(12)

and \(x_{0}\in {\mathbb {C}}\).

Write the initial value \(x_{0}\) in the form in (3). Then we have

$$\begin{aligned} x_{1}&= \biggl(a+\frac{1}{a} \biggr)^{3}-3 \biggl(a+ \frac{1}{a} \biggr)=a^{3}+ \frac{1}{a^{3}}, \end{aligned}$$

and by a simple inductive argument, we obtain

$$\begin{aligned} x_{n}=a^{3^{n}}+\frac{1}{a^{3^{n}}},\quad n\in {\mathbb {N}}_{0}. \end{aligned}$$
(13)

The corresponding consideration in Example 1 shows that equation (12) when \(\vert x_{0} \vert \ge 2\) is also an example of a hyperbolic-cosine-type difference equation, which is solvable. Moreover, we see that the following result holds.

Proposition 1

Consider equation (12). Then the following statements hold:

  1. (a)

    If \(x_{0}\in {\mathbb {C}}\) is given by (3), then the solution to the equation is given by (13).

  2. (b)

    If \(x_{0}\ge 2\), then the solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{3^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-3^{n}},\quad n\in {\mathbb {N}}_{0}. $$
  3. (c)

    If \(x_{0}\le -2\), then the solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{3^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-3^{n-1}}, \quad n\in {\mathbb {N}}. $$
  4. (d)

    If \(\vert x_{0} \vert \le 2\) and \(x_{0}=2\cos \theta \) for some \(\theta \in [0,2\pi )\), then the solution to the equation is given by

    $$ x_{n}=2\cos \bigl(3^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$

Following the above idea, we can try to express the quantity \(I_{4}\) in terms of \(I_{1}\) in a similar way, and then use the relation in order to obtain another solvable difference equation. Namely, we have

$$\begin{aligned} \biggl(a+\frac{1}{a} \biggr)^{4}=a^{4}+ \frac{1}{a^{4}}+4 \biggl(a^{2}+ \frac{1}{a^{2}} \biggr)+6=a^{4}+\frac{1}{a^{4}}+4 \biggl(a+\frac{1}{a} \biggr)^{2}-2. \end{aligned}$$
(14)

Let the sequence \((x_{n})_{n\in {\mathbb {N}}_{0}}\) be a solution to the following difference equation:

$$\begin{aligned} x_{n+1}=x_{n}^{4}-4x_{n}^{2}+2, \quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(15)

and \(x_{0}\in {\mathbb {C}}\).

Write the initial value \(x_{0}\) in the form in (3). Then we have

$$\begin{aligned} x_{1}&= \biggl(a+\frac{1}{a} \biggr)^{4}-4 \biggl(a+ \frac{1}{a} \biggr)^{2}+2=a^{4}+ \frac{1}{a^{4}}, \end{aligned}$$

and by a simple inductive argument, we obtain

$$\begin{aligned} x_{n}=a^{4^{n}}+\frac{1}{a^{4^{n}}} \end{aligned}$$
(16)

for \(n\in {\mathbb {N}}_{0}\).

So, equation (15) is also an example of a hyperbolic-cosine-type difference equation, which is solvable. Moreover, we see that the following result holds.

Proposition 2

Consider equation (15). Then the following statements hold:

  1. (a)

    If \(x_{0}\in {\mathbb {C}}\) is given by (3), then the solution to the equation is given by (16).

  2. (b)

    If \(x_{0}\ge 2\), general solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{4^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-4^{n}},\quad n\in {\mathbb {N}}_{0}. $$
  3. (c)

    If \(x_{0}\le -2\), general solution to the equation is given by the following formula:

    $$ x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{4^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-4^{n-1}}, \quad n\in {\mathbb {N}}. $$
  4. (d)

    If \(\vert x_{0} \vert \le 2\) and \(x_{0}=2\cos \theta \) for some \(\theta \in [0,2\pi )\), then the solution to the equation is given by

    $$ x_{n}=2\cos \bigl(4^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$

The corresponding relation between \(I_{5}\) and \(I_{1}\) is the following:

$$\begin{aligned} \biggl(a+\frac{1}{a} \biggr)^{5}&=a^{5}+ \frac{1}{a^{5}}+5 \biggl(a^{3}+ \frac{1}{a^{3}} \biggr)+10 \biggl(a+\frac{1}{a} \biggr) \\ &=a^{5}+\frac{1}{a^{5}}+5 \biggl(a+\frac{1}{a} \biggr)^{3}-5 \biggl(a+\frac{1}{a} \biggr), \end{aligned}$$
(17)

where in the last equality we have used relation (11).

Let the sequence \((x_{n})_{n\in {\mathbb {N}}_{0}}\) be a solution to the following difference equation:

$$\begin{aligned} x_{n+1}=x_{n}^{5}-5x_{n}^{3}+5x_{n}, \quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(18)

and \(x_{0}\in {\mathbb {C}}\).

Write the initial value \(x_{0}\) in the form in (3). Then we have

$$\begin{aligned} x_{1}&= \biggl(a+\frac{1}{a} \biggr)^{5}-5 \biggl(a+ \frac{1}{a} \biggr)^{3}+5 \biggl(a+\frac{1}{a} \biggr)=a^{5}+\frac{1}{a^{5}}, \end{aligned}$$

and by a simple inductive argument, we obtain

$$\begin{aligned} x_{n}=a^{5^{n}}+\frac{1}{a^{5^{n}}},\quad n\in {\mathbb {N}}_{0}. \end{aligned}$$
(19)

So, equation (18) is another example of a hyperbolic-cosine-type difference equation, which is solvable. Moreover, we see that the following result holds.

Proposition 3

Consider equation (18). Then the following statements hold:

  1. (a)

    If \(x_{0}\in {\mathbb {C}}\) is given by (3), then the solution to the equation is given by (19).

  2. (b)

    If \(x_{0}\ge 2\), general solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{5^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-5^{n}},\quad n\in {\mathbb {N}}_{0}. $$
  3. (c)

    If \(x_{0}\le -2\), general solution to the equation is given by the following formula:

    $$ x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{5^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-5^{n-1}}, \quad n\in {\mathbb {N}}. $$
  4. (d)

    If \(\vert x_{0} \vert \le 2\) and \(x_{0}=2\cos \theta \) for some \(\theta \in [0,2\pi )\), then the solution to the equation is given by

    $$ x_{n}=2\cos \bigl(5^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$

The corresponding relation between \(I_{6}\) and \(I_{1}\) is the following:

$$\begin{aligned} \biggl(a+\frac{1}{a} \biggr)^{6}&=a^{6}+ \frac{1}{a^{6}}+6 \biggl(a^{4}+ \frac{1}{a^{4}} \biggr)+15 \biggl(a^{2}+\frac{1}{a^{2}} \biggr)+20 \\ &=a^{6}+\frac{1}{a^{6}}+6 \biggl(a+\frac{1}{a} \biggr)^{4}-9 \biggl(a+\frac{1}{a} \biggr)^{2}+2, \end{aligned}$$
(20)

where in the last equality we have used (10) and (14).

Let the sequence \((x_{n})_{n\in {\mathbb {N}}_{0}}\) be a solution to the following difference equation:

$$\begin{aligned} x_{n+1}=x_{n}^{6}-6x_{n}^{4}+9x_{n}^{2}-2, \quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(21)

and \(x_{0}\in {\mathbb {C}}\).

Write the initial value \(x_{0}\) in the form in (3). Then we have

$$\begin{aligned} x_{1}&= \biggl(a+\frac{1}{a} \biggr)^{6}-6 \biggl(a+ \frac{1}{a} \biggr)^{4}+9 \biggl(a+\frac{1}{a} \biggr)^{2}-2=a^{6}+\frac{1}{a^{6}}, \end{aligned}$$

and by a simple inductive argument, we obtain

$$\begin{aligned} x_{n}=a^{6^{n}}+\frac{1}{a^{6^{n}}},\quad n\in {\mathbb {N}}_{0}. \end{aligned}$$
(22)

So, equation (21) is another example of a hyperbolic-cosine-type difference equation, which is solvable on a domain. Moreover, we see that the following result holds.

Proposition 4

Consider equation (21). Then the following statements hold:

  1. (a)

    If \(x_{0}\in {\mathbb {C}}\) is given by (3), then the solution to the equation is given by (22).

  2. (b)

    If \(x_{0}\ge 2\), general solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{6^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-6^{n}},\quad n\in {\mathbb {N}}_{0}. $$
  3. (c)

    If \(x_{0}\le -2\), general solution to the equation is given by the following formula:

    $$ x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{6^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-6^{n-1}}, \quad n\in {\mathbb {N}}. $$
  4. (d)

    If \(\vert x_{0} \vert \le 2\) and \(x_{0}=2\cos \theta \) for some \(\theta \in [0,2\pi )\), then the solution to the equation is given by

    $$ x_{n}=2\cos \bigl(6^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$

Remark 1

Relations (10), (11), (14), (17), and (20) are well known and are frequently used in various situations such as in solving the polynomial equations

$$ a_{k}x^{k}+a_{k-1}x^{k-1}+\cdots +a_{1}x+a_{0}=0, $$

in the case \(a_{j}=a_{k-j}\), \(j=\overline{0,k}\) (see, e.g., [37]).

2.2 Main equation

By using the procedure preceding Propositions 14, other solvable hyperbolic-cosine-type difference equations can be found. However, the corresponding relations become more and more complicated, so the method is not so effective. Note that equations (2), (12), (15), (18), and (21) can be written in the form

$$\begin{aligned} x_{n+1}=P_{k}(x_{n}),\quad n\in {\mathbb {N}}_{0}, \end{aligned}$$
(23)

where

$$\begin{aligned}& P_{2}(t)=t^{2}-2, \\& P_{3}(t)=t^{3}-3t, \\& P_{4}(t)=t^{4}-4t^{2}+2, \\& P_{5}(t)=t^{5}-5t^{3}+5t, \\& P_{6}(t)=t^{6}-6t^{4}+9t^{2}-2. \end{aligned}$$

Hence, it is of some interest to find a polynomial class \((P_{k})_{k\in {\mathbb {N}}}\) containing them.

To do this, it should be said that a very useful fact related to the sequence of polynomials \(P_{k}(t)\), \(k\in {\mathbb {N}}\), is that they satisfy a linear recursive relation of second order. Namely, let

$$ t:=a+\frac{1}{a}, $$

then

$$\begin{aligned} P_{k}(t)=a^{k}+\frac{1}{a^{k}}. \end{aligned}$$
(24)

Since

$$ \biggl(a^{k}+\frac{1}{a^{k}} \biggr) \biggl(a+\frac{1}{a} \biggr)=a^{k+1}+ \frac{1}{a^{k+1}}+a^{k-1}+\frac{1}{a^{k-1}}, $$

we have \(P_{k+1}(t)-P_{1}(t)P_{k}(t)+P_{k-1}(t)=0\), that is,

$$\begin{aligned} P_{k+1}(t)-tP_{k}(t)+P_{k-1}(t)=0 \end{aligned}$$
(25)

for \(k\ge 2\), which is the desired recursive relation.

From this, since initial values are

$$\begin{aligned} P_{1}(t)=t\quad \text{and}\quad P_{2}(t)=t^{2}-2, \end{aligned}$$
(26)

all the polynomials \(P_{k}(t)\) can be calculated recursively. Moreover, since it is a homogeneous linear difference equation, it can be solved in a closed form.

Indeed, the characteristic polynomial associated with equation (25) is \(\widehat{P}_{2}(\lambda )=\lambda ^{2}-t\lambda +1\), and its roots are

$$\begin{aligned} \lambda _{1,2}=\frac{t\pm \sqrt{t^{2}-4}}{2}. \end{aligned}$$
(27)

Hence, general solution to equation (25) has the following form:

$$\begin{aligned} P_{k}(t)=c_{1} \biggl(\frac{t+\sqrt{t^{2}-4}}{2} \biggr)^{k}+c_{2} \biggl( \frac{t-\sqrt{t^{2}-4}}{2} \biggr)^{k},\quad k\in {\mathbb {N}}. \end{aligned}$$
(28)

From (26) and (28), we have

$$ \begin{aligned} &c_{1} \biggl( \frac{t+\sqrt{t^{2}-4}}{2} \biggr)+c_{2} \biggl( \frac{t-\sqrt{t^{2}-4}}{2} \biggr)=t, \\ &c_{1} \biggl(\frac{t+\sqrt{t^{2}-4}}{2} \biggr)^{2}+c_{2} \biggl( \frac{t-\sqrt{t^{2}-4}}{2} \biggr)^{2}=t^{2}-2. \end{aligned} $$
(29)

The determinant of system (29) is

$$ \Delta = \begin{vmatrix} \frac{t+\sqrt{t^{2}-4}}{2} & \frac{t-\sqrt{t^{2}-4}}{2} \\ (\frac{t+\sqrt{t^{2}-4}}{2} )^{2} & ( \frac{t-\sqrt{t^{2}-4}}{2} )^{2} \end{vmatrix}=-\sqrt{t^{2}-4}. $$

Hence, after some calculations, we have

$$\begin{aligned} c_{1}=\frac{1}{\Delta } \begin{vmatrix} t & \frac{t-\sqrt{t^{2}-4}}{2} \\ t^{2}-2 & (\frac{t-\sqrt{t^{2}-4}}{2} )^{2} \end{vmatrix}=1 \end{aligned}$$
(30)

and

$$\begin{aligned} c_{2}=\frac{1}{\Delta } \begin{vmatrix} \frac{t+\sqrt{t^{2}-4}}{2} & t \\ (\frac{t+\sqrt{t^{2}-4}}{2} )^{2} & t^{2}-2 \end{vmatrix}=1. \end{aligned}$$
(31)

By using (30) and (31) in (28), we have

$$\begin{aligned} P_{k}(t)= \biggl(\frac{t+\sqrt{t^{2}-4}}{2} \biggr)^{k}+ \biggl( \frac{t-\sqrt{t^{2}-4}}{2} \biggr)^{k} \end{aligned}$$
(32)

for \(k\in {\mathbb {N}}\), which is the desired closed-form formula for \(P_{k}\).

Remark 2

Related recursive relations to the one in (25) appeared frequently in mathematics. A close relative to it is the following recursive relation:

$$ P_{k+1}(t)-2tP_{k}(t)+P_{k-1}(t)=0,\quad k\in {\mathbb {N}}, $$

with the initial conditions

$$ P_{0}(t)=1\quad \text{and}\quad P_{1}(t)=t, $$

defining Chebyshev polynomials, which are usually denoted by \(T_{k}(t)\).

If \(\vert t \vert \ge 1\), then we have

$$ T_{k}(t)=\frac{(t+\sqrt{t^{2}-1})^{k}+(t-\sqrt{t^{2}-1})^{k}}{2} $$

for \(k\in {\mathbb {N}}_{0}\) (see, e.g., [38, 39]).

Remark 3

Using (25), (26), and a simple inductive argument, we can easily prove the following representations:

$$\begin{aligned} &P_{2k-1}(t)=t^{2k-1}-(2k-1)t^{2k-3}+\sum _{j=2}^{k-1}a_{j}t^{2(k-j)-1}, \\ &P_{2k}(t)=t^{2k}-2kt^{2k-2}+\sum _{j=2}^{k}b_{j}t^{2(k-j)} \end{aligned}$$

for some \(a_{j}\), \(j=\overline{2,k-1}\), and \(b_{j}\), \(j=\overline{2,k}\). The simple proof is left to the reader.

From the above consideration similar to Example 1, the following result is obtained, which completely solves the solvability problem for the class of difference equations in (23).

Theorem 1

Consider equation (23), where \(k\in {\mathbb {N}}\setminus \{1\}\) and the polynomial \(P_{k}\) is given by (32). Then the following statements hold:

  1. (a)

    If \(x_{0}\in {\mathbb {C}}\) is given by (3), then the solution to the equation is given by

    $$ x_{n}=a^{k^{n}}+\frac{1}{a^{k^{n}}},\quad n\in {\mathbb {N}}_{0}. $$
  2. (b)

    If \(x_{0}\ge 2\), general solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{k^{n}}+ \biggl( \frac{x_{0}+\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-k^{n}},\quad n\in {\mathbb {N}}_{0}. $$
  3. (c)

    If \(x_{0}\le -2\), general solution to the equation is given by

    $$ x_{n}= \biggl(\frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{k^{n-1}}+ \biggl( \frac{x_{0}^{2}-2-x_{0}\sqrt{x_{0}^{2}-4}}{2} \biggr)^{-k^{n-1}}, \quad n\in {\mathbb {N}}. $$
  4. (d)

    If \(\vert x_{0} \vert \le 2\) and \(x_{0}=2\cos \theta \) for some \(\theta \in [0,2\pi )\), then the solution to the equation is given by

    $$ x_{n}=2\cos \bigl(k^{n}\theta \bigr),\quad n\in {\mathbb {N}}_{0}. $$