1 Introduction

It is a well-known fact from Euler’s work [17], that the infinite power tower

$$\begin{aligned} a^{(a^{(a^{(a^{^{.^{.^{.}}}})})})} \end{aligned}$$
(1)

converges if, and only if, the real value a belongs to the interval \(\left[ 1/e^{e},e^{1/e}\right] \). Many authors have rediscovered or tried to generalize this result, see for instance the survey paper by Knoebel [22], see also [2] for interesting explanations of some historical facts. In the complex plane, Carlsson [9] provided in 1907 a necessary condition for the convergence of the tower. Different sufficient conditions were succesively given by Thron [35] and Shell [34], but in 1983 Baker and Rippon [4], see also [5], provided a sufficient condition which generalized the previous ones. An interesting illustration of the fractal boundary of the set where the power tower converges in the complex plane can be found in [24], see also the nice 2004 Lambert W poster http://www.orcca.on.ca/LambertW/.

Tower (1) can be seen as the limit, when it exists, of the tetration sequenceFootnote 1 defined as

$$\begin{aligned} ^{n}a=\left\{ \begin{array} [c]{ll} 1, &{} \quad \text {if }\quad n=0\\ a^{\left( ^{n-1}a\right) }, &{}\quad \text {if }\quad n=1,2,\ldots \end{array} \right. \end{aligned}$$
(2)

The limit of (2) should be expressed from right to left as

$$\begin{aligned} .^{.^{.^{a^{\left( a^{\left( a^{1}\right) }\right) }}}} \end{aligned}$$
(3)

In the current paper we are interested in the study of the convergence of the following tower

$$\begin{aligned} .^{.^{.^{a^{\left( a^{\left( a^{c}\right) }\right) }}}} \end{aligned}$$
(4)

in terms of the cusp value c. Tower (4) is the limit of a sequence similar to the tetration with c as the initial data instead of 1. We are going to provide the exact range of values of the cusp ensuring the convergence or divergence of this power tower. In particular, we will see that, even when \(a\in ] 1,e^{1/e}] \) which is a subinterval of the Euler’s result, the tower (4) can be divergent for a set of values of c and, it is convergent for any real value of the cusp whenever \(a\in \left[ 1/e^{e},1\right] \). We will also see what happens when \(a\in ] 0,1/e^{e}[ \) for each value of c.

One of the most outstanding and complete works related to the study of infinite power towers can be found in the paper of Barrow [6], where he dealt with the convergence of the following infinite tower with generic real exponents

$$\begin{aligned} a_{0}^{(a_{1}^{(a_{2}^{(a_{3}^{^{.^{.^{.}}}})})})} \end{aligned}$$
(5)

which generalizes the tower (1). We would like to emphasize that tower (4) is not a particular case of tower (5) except for the tetration limit, so the test of convergence of Barrow does not provide information on (4). For complex exponents, (4) was also analyzed by Shell in [34] whose results, particularized to the real case, provide, for each \(a\ \)in \(\left[ 1/e^{e},e^{1/e}\right] \), an interval for the cusp value where the tower is convergent. This interval for the cusp is indeed a neighborhood of the limit value of the infinite tower when it converges, we will state what happens for any real cusp.

In the general complex case for tower (5), that is, all the exponents of the tower can be different complex numbers, Bachman, in [3], proved and generalized to the complex case a result that Ramanujan wrote in [28], one of his notebooks, consisting of a test of convergence of the generic real tower. It must be said that the results of Ramanujan/Bachman applied to the real case, do not give more information than the results obtained by Barrow, except in the case when \(a_{i}\ge e^{1/e}\) and \(a_{i}\le 1/e^{e}\). It is worth saying again that, as (4) is not a particular case of (5), the test given in [3] does not provide information on the behavior of (4).

It is clear that the limit, when it exists, of the infinite power tower (3) is a solution of the real equation

$$\begin{aligned} x=a^{x} \end{aligned}$$
(6)

whose solutions are represented in Fig. 1.

Fig. 1
figure 1

Solutions of Eq. (6)

In the case that \(a\in ] 1,e^{1/e}] \), the limit of the power tower when exists is indeed the smallest solution of the Eq. (6). An immediate and logical question arises when one visualizes the graph of Fig. 1, namely, are the solutions of Eq. (6) the limit of a sequence “related to the infinite power tower” in the case \(a\in ] 0,1/e^{e} [\) ? And the same question can be asked in the case of the largest solutions of (6) for \(a\in ] 1,e^{1/e}[ \). The answer is yes, and it is as beautiful as surprising. The key idea lies in rewriting Eq. (6) as

$$\begin{aligned} x=\log _{a}x \end{aligned}$$
(7)

Now, observe that Eq. (7) suggests the following infinite “tower” of logarithms

$$\begin{aligned} \cdots \left( \log _{a}\left( \log _{a}\left( \log _{a}\left( b\right) \right) \right) \right) . \end{aligned}$$
(8)

Obviously, the limit, when it exists, of this tower is a solution of Eq. (7). As a curiosity, the expression (8) can actually be rewritten with the shape of an inverted tower, specifically as

$$\begin{aligned} \left( \begin{array} [c]{ccc} \ddots &{} &{} .^{.^{.}}\\ &{} _{-\log _{\left( -\log _{\left( -\log _{1/b}a\right) }a\right) }a} &{} \end{array} \right) ^{-1} \end{aligned}$$

Also, (8) can be expressed in terms of the natural base of logarithms as

$$\begin{aligned} \cdots \frac{1}{\ln a}\ln \left( \frac{1}{\ln a}\ln \left( \frac{1}{\ln a}\ln b\right) \right) . \end{aligned}$$

In the logarithm tower (8) it is essential the value of b, first because of the existence of the logarithms composition involved and second, but not least, because of its convergence. Cho and Park in [11] proved for \(a\in ] 0,1/e^{e}[ \) and \(b=1/e\) that the logarithm tower (8) converges to the solutions of Eq. (7)\(\equiv \)(6) and, for \(a\in ] 1,e^{1/e}[ \) and \(b=e\), that the logarithm tower (8) converges to the largest solutions of Eq. (7)\(\equiv \)(6). Our contribution in the current paper will be again to provide the exact intervals for the value b that make the infinite tower of logarithms convergent, also we will detail the behavior of this tower when it is not convergent.

It is a well known fact that the towers of powers and logarithms are closely related to the Lambert W function, that is, to the solutions of the equation

$$\begin{aligned} ye^{y}=z \end{aligned}$$

with data z and unknown y. One of the most relevant works in this subject is the paper of Corless et al. [13] where it is stated that

$$\begin{aligned} W\left( z\right) =\frac{z}{\exp \frac{z}{\exp \frac{z}{\ddots }}}\text { for }\left| W\left( z\right) \right| <1 \end{aligned}$$
(9)

and

$$\begin{aligned} W\left( z\right) =\ln \frac{z}{\ln \frac{z}{\ln \frac{z}{\ddots }}}\text { for }\left| W\left( z\right) \right| >1 \end{aligned}$$
(10)

where W is the Lambert W function (see [13, Eq. (98) and (99)]). These formulas are obtained from rewriting the expressions \(W\left( z\right) =z/\exp W\left( z\right) \) and \(W\left( z\right) =\ln \left( z/W\left( z\right) \right) \) as iterations, more specifically, (9) and (10) are, respectively, the limits of the iterative processes

$$\begin{aligned} y_{n}=\frac{z}{\exp \left( y_{n-1}\right) }\text {, }n=1,2,3,\ldots \end{aligned}$$
(11)

and

$$\begin{aligned} y_{n}=\ln \left( \frac{z}{y_{n-1}}\right) \text {, }n=1,2,3,\ldots \end{aligned}$$
(12)

under certain specific initial data \(y_{0}\) which are not specified in [13]. As we will see, from the paper of Cho and Park [11] it is possible to deduce a particular initial data for which the previous sequences are convergent. As an application of our results in the current paper, we will be able to provide the whole set of real initial data ensuring the convergence of these two sequences.

The towers of powers and logarithms appear naturally in many mathematical problems associated to physical phenomena, indeed, the towers (limits) are the solutions of the equations modeling these phenomena and frequently the equations are rewritten as the Lambert equation \(ye^{y}=z\). This is one of the many reasons why the Lambert W function is so important and well known. Some examples of problems where the Lambert W function appears can be found in https://en.wikipedia.org/wiki/Lambert_W_function. Consequently, a wild amount of papers related to these problems can be found in the literature, here we only cite a small sample of them, for instance, [8, 10, 15, 21, 25, 26, 36] and, [18]. The relevance of the Lambert equation lead also to the researchers to look for good approximations and tight bounds on its solutions, see for example, [1, 7, 19, 20, 32, 33] and, [30].

The structure of the paper is as follows. After the introductory Sect. 1, we give in Sect. 2 the basic definitions, notations and preliminary results which will be used later on. The main results of the work are given in Sect. 3, where the exact sets of initial data ensuring the convergence of the towers of powers and logarithms, (4) and (8), are specified. The complete behavior of the towers, not only the convergence, is described in terms of the initial data values. The previous results are applied in Sect. 4 to describe the set of initial values which ensure the convergence of some iterative schemes derived from the Lambert W function.

2 Preliminaries

To start with, let us introduce a notation for the power and logarithm tower sequences under study in this paper. We propose a similar notation for both towers in order to write our results in a more unified way. Moreover, we think it could help the reader with intuition on some parallel ideas.

The general term of the power tower sequence is defined as

$$\begin{aligned} P_{n}\left( a,c\right) :=\left\{ \begin{array} [c]{ll} c, &{} \text {if }n=0\\ a^{P_{n-1}\left( a,c\right) }, &{} \text {if }n=1,2,\ldots \end{array} \right. \end{aligned}$$
(13)

and, similarly, the general term of the logarithm tower sequence for \(a\not =1 \) is defined as

$$\begin{aligned} L_{n}\left( a,b\right) :=\left\{ \begin{array} [c]{ll} b, &{} {{{\text {if }}}}n=0,\\ \log _{a}\left( L_{n-1}\left( a,b\right) \right) , &{} {{{\text {if }}} }n=1,2,\ldots , \end{array} \right. \end{aligned}$$
(14)

The limit of these sequences, when it exists, will be denoted, respectively, by

$$\begin{aligned} P\left( a,c\right) :=.^{.^{.^{a^{\left( a^{\left( a^{c}\right) }\right) }}}} \end{aligned}$$

and

$$\begin{aligned} L\left( a,b\right) :=\cdots \left( \log _{a}\left( \log _{a}\left( \log _{a}\left( b\right) \right) \right) \right) . \end{aligned}$$

When \(c=1\), \(P_{n}(a,1)\) is nothing else but the tetration sequence of base a and height n defined in (2), so, sequence (13) can be seen as a generalization of tetration.

As we have already commented, but not specified, Eq. (6) has a unique solution if \(a\in \left[ 0,1\right] \) and, two solutions if \(a\in ] 1,e^{1/e}[ \), for \(a=e^{1/e}\) the equation has also a unique solution. We will use the following notation for these solutions regarding the usual notation of the two real branches of the Lambert W function (we will see the correspondence in Sect. 4)

$$\begin{aligned} \left\{ \begin{array}[c]{cl} x_{0}\left( a\right) &{} \text {is the smallest solution of }(6) \text { for }a\in ] 0,e^{1/e}] \\ x_{-1}\left( a\right) &{} \text {is the largest solution of }(6) \text { for }a\in ] 1,e^{1/e}[ \end{array} \right. \end{aligned}$$
(15)

For the extreme \(a=e^{1/e}\), we will use the notation, when it is necessary, \(x_{-1}\left( e^{1/e}\right) :=x_{0}\left( e^{1/e}\right) =e.\)

For \(a\in ] 1,e^{1/e}[ \), the following result gathers some well-known properties about the unique two solutions of Eq. (6).

Lemma 1

Let \(a\in ] 1,e^{1/e}[ \), one has:

  1. 1.

    \({a}<x_{0}\left( a\right)<e<x_{-1}\left( a\right) \)

  2. 2.

    \(a^{x}<x\quad \)if \(x_{0}(a)<x<x_{-1}\left( a\right) \)

  3. 3.

    \(a^{x}>x\quad \)if \(x>x_{-1}\left( a\right) \) or \(x<x_{0}(a)\)

It is a well known fact that, see for example [6, Th. 5], if a belongs to the interval \(] 0,1/{e^{e}}[ \) and \(c=1\), the power tower sequence (13) is not convergent, indeed their subsequences of odd and even terms, \(\left( P_{2n-1}\left( a,1\right) \right) _{n}\) and \(\left( P_{2n}\left( a,1\right) \right) _{n}\), are convergent to different values, \(P_{odd}\left( a,1\right) \) and \(P_{even}\left( a,1\right) \), respectively, for each a. Moreover, they are closely related with the equation

$$\begin{aligned} x=a^{\left( a^{x}\right) } \end{aligned}$$
(16)

whose solutions can be visualized in Fig. 2.

Fig. 2
figure 2

Solutions of Eq. (16)

For the sake of simplicity, let us denote

$$\begin{aligned}{}\begin{array}[c]{ll} P_{2n-1}\left( a\right) :=P_{2n-1}\left( a,1\right) ,\quad &{} P_{2n}\left( a\right) :=P_{2n}\left( a,1\right) \\ P_{odd}\left( a\right) :=P_{odd}\left( a,1\right) ,\quad &{} P_{even}\left( a\right) :=P_{even}\left( a,1\right) . \end{array} \end{aligned}$$

The next results provide some properties of the subsequences \(\left( P_{2n-1}\left( a\right) \right) _{n}\) and \(\left( P_{2n}\left( a\right) \right) _{n}\) (see, for instance, [6, 14, 22, 27, 31], for proofs and other details).

Lemma 2

If \(a\in ] 0,1/{e^{e}}[ \), then:

  1. 1.

    \(\left( P_{2n-1}\left( a\right) \right) _{n}\) is an increasing sequence convergent to \(P_{odd}\left( a\right) \), and \(\left( P_{2n}\left( a\right) \right) _{n}\) is a decreasing sequence convergent to \(P_{even} \left( a\right) \). Moreover

    $$\begin{aligned} {a}<P_{odd}\left( a\right)<x_{0}\left( a\right)<\frac{1}{e}<P_{even}\left( a\right) <1. \end{aligned}$$
  2. 2.

    The subsequences limits \(P_{odd}\left( a\right) \) and \(P_{even}(a)\) satisfy

    $$\begin{aligned} a^{P_{odd}\left( a\right) }=P_{even}(a)\text { and }a^{P_{even}\left( a\right) }=P_{odd}(a). \end{aligned}$$

Lemma 3

One has that:

  1. 1.

    If \(a\in ] 0,1/{e^{e}}[ \), the unique solutions of (16) are \(P_{odd}\left( a\right) ,\ x_{0}\left( a\right) ,\ \)and \(P_{even}\left( a\right) \) and it is satisfied that

    $$\begin{aligned}{}\begin{array}[c]{l}a^{x}<\log _{a}x\quad \text {if}\quad 0<a<P_{odd}(a)\text { or }x_{0} (a)<x<P_{even}(a),\\ a^{x}>\log _{a}x\quad \text {if}\quad P_{odd}(a)<x<x_{0}(a)\text { or } P_{even}(a)<x. \end{array} \end{aligned}$$
  2. 2.

    If \(a\in ] 1/{e^{e},1}[ \), the unique solution of (16) is \(x_{0}\left( a\right) \) and it is satisfied that

    $$\begin{aligned}{}\begin{array}[c]{l} a^{x}<\log _{a}x\quad \text {if}\quad 0<x<x_{0}\left( a\right) ,\\ a^{x}>\log _{a}x\quad \text {if}\quad x>x_{0}\left( a\right) . \end{array} \end{aligned}$$
  3. 3.

    If \(a\in ] 1{,e}^{1/e}[ \), the unique solutions of (16) are \(x_{0}\left( a\right) \) and \(x_{-1}\left( a\right) \) and it is satisfied that

    $$\begin{aligned} \begin{array} [c]{l} a^{x}>\log _{a}x\quad \text {if}\quad 0<x<x_{0}\left( a\right) \text { or }x>x_{-1}\left( a\right) ,\\ a^{x}<\log _{a}x\quad \text {if}\quad x>x_{0}\left( a\right) . \end{array} \end{aligned}$$

3 On the convergence of the tower sequences for general initial data

As we have already commented, solutions of Eq. (6) can be represented by means of infinite towers of powers and logarithms. These infinite towers are indeed the limits of the sequences \(\left( P_{n}\left( a,c\right) \right) _{n}\) and \(\left( L_{n}\left( a,b\right) \right) _{n}\) starting from specific initial data c and b, respectively. Nevertheless, it is interesting to show a general description of convergence/divergence depending on the initial values chosen c and b. This is the goal of the current section, where the functions \(P_{odd}\left( a\right) \) and \(P_{even}\left( a\right) \), as well as \(x_{0}\left( a\right) \) and \(x_{-1}\left( a\right) \), will play an important role delimiting the initial data regions that can be seen as the basins of attraction of the tower sequences.

In the next result we state the initial data sets for which the logarithm tower sequence converges. Obviously, these sets contain the initial data of Cho and Park, so that the following result can be seen as a generalization of [11, Th.1, statements b and c], in fact, the proofs have certain similarities.

Recall that we are using the notation \(x_{-1}\left( e^{1/e}\right) :=x_{0}\left( e^{1/e}\right) =e.\)

Theorem 4

The limit of the logarithm tower sequence defined in (14) satisfies that:

$$\begin{aligned} L\left( a,b\right) =\left\{ \begin{array}[c]{cl} x_{0}\left( a\right) &{} \text {if }a\in ] 0,1/{e^{e}}[ \text { and }b\in ] P_{odd}\left( a\right) ,P_{even}\left( a\right) [ ,\\ x_{-1}\left( a\right) &{} \text {if }a\in ] 1,e^{1/e}] \text { and }b>x_{0}\left( a\right) . \end{array} \right. \end{aligned}$$

Proof

Let us prove first that \(L\left( a,b\right) =x_{0}\left( a\right) \) if \(a\in ] 0,1/{e^{e}}[ \) and \(b\in ] P_{odd}\left( a\right) ,P_{even}\left( a\right) [ \).

Since we are assuming \(P_{odd}(a)<b<P_{even}(a)\) and \(0<a<1/e^{e}<1\), being \(P_{odd}(a)>0\), then

$$\begin{aligned} \log _{a}P_{even}(a)<\log _{a}b<\log _{a}P_{odd}(a). \end{aligned}$$

From statement 2 of Lemma 2 one has, taking there logarithms base a\(P_{odd}(a)=\log _{a}P_{even}(a)\) and \(\log _{a}P_{odd}(a)=P_{even} (a)\), so the previous inequalities becomes

$$\begin{aligned} P_{odd}(a)<L_{1}\left( a,b\right) <P_{even}(a) \end{aligned}$$

which leads, proceeding analogously, to the sequence \(\left( L_{n} (a,b)\right) _{n}\) be well defined with

$$\begin{aligned} P_{odd}(a)<L_{n}(a,b)<P_{even}(a)\quad \forall n. \end{aligned}$$

Let us see that subsequences \(\left( L_{2n}(a,b)\right) _{n}\) and \(\left( L_{2n-1}(a,b)\right) _{n}\) are monotone. Remember first that, from statement 1 of Lemma 2, one has

$$\begin{aligned} P_{odd}(a)<x_{0}(a)<P_{even}(a), \end{aligned}$$

whenever \(a\in ] 0,1/{e^{e}}[ \), so, we can distinguish the following three possible cases for b: (i) \(x_{0}(a)<b<P_{even}(a)\), (ii) \(P_{odd}(a)<b<x_{0}(a)\), and (iii) \(b=x_{0}(a)\).

  1. (i)

    If \(x_{0}(a)<b<P_{even}(a)\), we have from statement 1 of Lemma 3 that

    $$\begin{aligned} a^{b}<\log _{a}b=L_{1}(a,b) \end{aligned}$$

    and, taking logarithms base \(a\left( <1\right) \) in the previous inequality, one obtains

    $$\begin{aligned} b>\log _{a}L_{1}(a,b)=L_{2}(a,b). \end{aligned}$$

    Taking again logarithms one gets

    $$\begin{aligned} L_{1}\left( a,b\right) <L_{3}(a,b) \end{aligned}$$

    and continuing so on one arrives to

    $$\begin{aligned} (L_{2n}(a,b))_{n}\quad \text {is decreasing,} \end{aligned}$$

    and

    $$\begin{aligned} (L_{2n-1}(a,b))_{n}\quad \text {is increasing.} \end{aligned}$$

    Observe also that, since \(x_{0}(a)<b\), taking once more logarithms base \(a\left( <1\right) \), and remembering that \(\log _{a}x_{0}(a)=x_{0}(a)\), one gets

    $$\begin{aligned} L_{1}(a,b)<x_{0}(a)<b. \end{aligned}$$

    Therefore one obtains that

    $$\begin{aligned} L_{1}(a,b)<L_{3}(a,b)<L_{5}(a,b)<\cdots<x_{0}(a)<\cdots L_{4}(a,b)<L_{3}(a,b)<b. \end{aligned}$$

    Consequently, \(\left( L_{2n}(a,b)\right) _{n}\) is convergent to a certain \(\beta _{1}\left( a,b\right) =:\beta _{1}\) and \(\left( L_{2n-1}(a,b)\right) _{n}\) is convergent to a certain \(\beta _{2}\left( a,b\right) =:\beta _{2}\) with

    $$\begin{aligned} P_{odd}(a)<\beta _{1}\le x_{0}\left( a\right) \le \beta _{2}<P_{even}(a). \end{aligned}$$

    Now, since \(a^{L_{n}\left( a,b\right) }=L_{n-1}\left( a,b\right) \), it is obvious that

    $$\begin{aligned} a^{\beta _{1}}=\beta _{2}\ \text {and }a^{\beta _{2}}=\beta _{1}, \end{aligned}$$

    and, consequently,

    $$\begin{aligned} a^{\left( a^{\beta _{1}}\right) }=a^{\beta _{2}}=\beta _{1}\ \text {and }a^{\left( a^{\beta _{2}}\right) }=a^{\beta _{1}}=\beta _{2} \end{aligned}$$

    which implies that \(\beta _{1}\)and \(\beta _{2}\) are both solutions of the equation \(a^{\left( a^{x}\right) }=x\), different from \(P_{odd}(a)\) and \(P_{even}(a)\). Therefore, again from statement 1 of Lemma 3 one has necessarily that

    $$\begin{aligned} \beta _{1}=\beta _{2}=x_{0}(a), \end{aligned}$$

    and, hence,

    $$\begin{aligned} \lim _{n}L_{n}\left( a,b\right) =x_{0}(a). \end{aligned}$$
  2. (ii)

    If \(P_{odd}(a)<b<x_{0}(a)\), the proof is analogous to i). Just observe that, under the current hypothesis, subsequences \(\left( L_{2n}(a,b)\right) _{n}\) and \(\left( L_{2n-1}(a,b)\right) _{n}\) are increasing and decreasing, respectively.

  3. (iii)

    If \(b=x_{0}(a)\), we simply have that the subsequences \(\left( L_{2n}(a,b)\right) _{n}\) and \(\left( L_{2n-1}(a,b)\right) _{n}\) are constantly equal to \(x_{0}(a)\).

Let us prove now that \(L\left( a,b\right) =x_{-1}\left( a\right) \) if \(a\in ] 1,e^{1/e}] \) and \(b>x_{0}\left( a\right) \).

It is an immediate consequence of Lemma 1. Indeed, we can distinguish again three cases: (i) \(x_{0}(a)<b<x_{-1}(a)\), (ii) \(b>x_{-1}(a)\), and (iii) \(b=x_{-1}(a)\).

  1. (i)

    If \(x_{0}(a)<b<x_{-1}(a)\), which is the case, for instance, of \(b=e\), it is easy to see that \((L_{n}\left( a,b\right) )_{n}\) is increasing and bounded above by \(x_{-1}(a)\), then \(\left( L_{n}(a,b)\right) _{n}\) converges to certain \(\gamma (a,b)=:\gamma \) with

    $$\begin{aligned} x_{0}(a)<\gamma \le x_{-1}(a), \end{aligned}$$

    but, since \(\log _{a}L_{n-1}(a,b))=L_{n}(a,b)\), then \(\log _{a}(\gamma )=\gamma \) and \(\gamma \) is a solution of equation \(a^{x}=x\) different from \(x_{0}(a)\), which necessarily implies

    $$\begin{aligned} \gamma =x_{-1}(a). \end{aligned}$$
  2. (ii)

    If \(b>x_{-1}(a)\), the proof is analogous to i). Just observe that, under the current hypothesis, \((L_{n}\left( a,b\right) )_{n}\) is decreasing and bounded below by \(x_{-1}(a)\).

  3. (iii)

    If \(b=x_{-1}(a)\), we simply have that the sequence \(\left( L_{n}(a,b)\right) _{n}\) is constantly equal to \(x_{-1}(a)\). \(\square \)

Remark 5

Observe that \(b=1/e\) is the unique common initial datum for all \(a\in ] 0,1/{e^{e}}[ \), and \(b=e\) is the unique common initial datum for all \(a\in ] 1,e^{1/e}] \).

The next result describes the behavior of the sequence \(\left( L_{n}\left( a,b\right) \right) _{n}\) when the initial data lies outside the intervals of convergence given in Theorem 4.

Proposition 6

One has that:

  1. 1.

    In the following cases there exists \(n\ge 1\) such that \(L_{n}(a,b)\le 0\) and, therefore, \(\left( L_{n}(a,b)\right) _{n}\) is not a sequence of real numbers:

    1. (a)

      \(a\in ] 0,1/{e^{e}}[ \) and \(0<b\notin \left[ P_{odd} (a),P_{even}(a)\right] \).

    2. (b)

      \(a\in [ 1/{e^{e}},1[ \) and \(0<b\ne x_{0}\left( a\right) \).

    3. (c)

      \(a\in ] 1,e^{1/e}] \) and \(0<b<x_{0}\left( a\right) \).

  2. 2.

    In the case \(a\in ] 0,1/{e^{e}}[ \), it is satisfied that:

    1. (a)

      If \(b=P_{odd}(a)\) then \(L_{2n}(a,b)=P_{odd}(a)\) and \(L_{2n-1} (a,b)=P_{even}(a).\)

    2. (b)

      If \(b=P_{even}(a)\) then \(L_{2n}(a,b)=P_{even}(a)\) and \(L_{2n-1} (a,b)=P_{odd}(a)\).

Proof

Statement 1.

(a):

We distinguish two cases:

\(\bullet \) If \(0<b<P_{odd}(a)\), we have by using Lemma 2 (2) that

$$\begin{aligned} L_{1}(a,b)=\log _{a}b>\log _{a}P_{odd}(a)=P_{even}\left( a\right) \end{aligned}$$

which implies

$$\begin{aligned} L_{2}(a,b)=\log _{a}L_{1}\left( a,b\right) <\log _{a}P_{even}(a)=P_{odd} \left( a\right) \end{aligned}$$

and, by other hand, Lemma 3 (1), gives

$$\begin{aligned} a^{b}<\log _{a}b=L_{1}\left( a,b\right) , \end{aligned}$$

and, consequently,

$$\begin{aligned} b>\log _{a}L_{1}\left( a,b\right) =L_{2}\left( a,b\right) . \end{aligned}$$

Assume, reasoning by contradiction, that \(L_{2n}\left( a,b\right) >0\) for all \(n\ge 1\), then we have that \(0<L_{2}(a,b)<P_{odd}(a)\) and we can repeat the previous procedure obtaining

$$\begin{aligned} P_{odd}\left( a\right)>L_{2}\left( a,b\right) >\log _{a}L_{3}\left( a,b\right) =L_{4}\left( a,b\right) . \end{aligned}$$

Proceeding analogously we obtain that \(\left( L_{2n}\left( a,b\right) \right) _{n}\) is a strictly positive decreasing sequence, consequently convergent to a certain non-negative \(\alpha (a,b)=:\alpha <P_{odd}(a)\). Since \(\log _{a}\log _{a}L_{2n}\left( a,b\right) =L_{2n}\left( a,b\right) \) one has that \(\alpha =a^{a^{\alpha }}\), that is, \(\alpha \) is a solution of (16) strictly less than \(P_{odd}(a)\) which is a contradiction with Lemma 2 (1) together with Lemma 3 (1).

\(\bullet \) In the case \(b>P_{even}(a)\), if \(b\ge 1\) then \(L_{1}\left( a,b\right) =\log _{a}b\le 0\) and the proof is finished, in the remaining case \(P_{even}(a)<b<1\) which implies

$$\begin{aligned} 0<L_{1}\left( a,b\right) <P_{odd}\left( a\right) \end{aligned}$$

and we can proceed analogously to the previous case, through the subsequence of odd terms, to achieve the same conclusion.

(b):

The proof is completely analogous to the previous statement, specifically, if we distinguish the cases \(0<b<x_{0}\left( a\right) \) and \(b>x_{0}\left( a\right) \), then \(x_{0}\left( a\right) \) plays the role of \(P_{odd}(a)\) in the first case and of \(P_{even}(a)\) in the second case, only take into account that now it is used Lemma 3 (2) with \(x_{0}\left( a\right) \) being the unique solution of (16).

(c):

It is similar as the previous ones but using Lemma 3 (3) instead. In this case one obtains that \(L_{2n}(a,b)\) is an increasing sequence bounded above by \(x_{0}\left( a\right) \), consequently converging to a certain \(\alpha (a,b)=:\alpha \le x_{0}\left( a\right) \), indeed \(\alpha <1\) since in other case the proof is finished, but if \(\alpha<1<x_{0}\left( a\right) \) it leads to a contradiction with the fact that \(\alpha \) is solution of (16).

Statement 2. It is a straightforward consequence of Lemma 2 (2).

\(\square \)

Remark 7

From the previous results we can detail the behavior of the sequence \(\left( L_{n}\left( a,b\right) \right) _{n}\) in terms of the initial data chosen in the non-trivial cases \(b\not =x_{0}\left( a\right) \) and \(b\not =x_{-1}\left( a\right) \), with \(b>0\). In the cases \(b=x_{0} \left( a\right) \) or \(b=x_{-1}\left( a\right) \) the sequence remains constant at the corresponding value.

  • If \(a\in ] 0,1[ \), the sequence \(\left( L_{n}\left( a,b\right) \right) _{n}\) jumps alternatively to both sides of \(x_{0}\left( a\right) \).

    • In the case \(a\in ] 0,1/{e^{e}}[ \) and \(b\in ] P_{odd}\left( a\right) ,P_{even}\left( a\right) [ \), the subsequences of above and of below monotonically converge to \(x_{0}\left( a\right) \). If b is one of the extremes of the interval, the sequence keeps jumping from one extreme to the other indefinitely.

    • When \(a\in ] 0,1/{e^{e}}[ \) and b is outside of \(\left[ P_{odd}\left( a\right) ,P_{even}\left( a\right) \right] \), or \(a\in [ 1/{e^{e},1}[ \), the subsequences of above and of below become negative or zero at some n.

  • If \(a\in ] 1,e^{1/e}] \), the sequence \(\left( L_{n}\left( a,b\right) \right) _{n}\) is monotone. Moreover:

    • In the case \(b>x_{-1}\left( a\right) \) the sequence converges decreasingly to \(x_{-1}\left( a\right) .\)

    • In the case \(x_{0}\left( a\right)<b<x_{-1}\left( a\right) \) the sequence converges increasingly to \(x_{-1}\left( a\right) .\)

    • In the case \(b<x_{0}\left( a\right) \) the sequence is decreasing and become negative or zero at some n.

The following result describes the behavior of the power tower sequence in terms of the initial data. In the proof, we will give some more details than in the main statement of the theorem. Recall again that we are using the notation \(x_{-1}\left( e^{1/e}\right) :=x_{0}\left( e^{1/e}\right) =e.\)

Theorem 8

The limit of the power tower sequence defined in (13) satisfies that:

$$\begin{aligned} P\left( a,c\right) =\left\{ \begin{array} [c]{cl} \not \exists &{} \text { if }a\in ] 0,1/{e^{e}}[ \text { and }c\ne x_{0}(a),\\ x_{0}\left( a\right) &{} \text {if }a\in \left[ 1/{e^{e}},1\right] \text { (}\forall c\in {\mathbb {R}}\text {) or }a\in ] 1,e^{1/e}] \text { and }c<x_{-1}\left( a\right) ,\\ +\infty &{} \text {if }a\in ] 1,e^{1/e}] \text { and }c>x_{-1}\left( a\right) . \end{array} \right. \end{aligned}$$

Proof

First of all observe that, if \(c\le 0\), then \(P_{1}(a,c)>0\), hence, the behavior of the sequence \(\left( P_{n}(a,c)\right) _{n}\) with non-positive initial data is completely described through the positive ones, so, let us assume that \(c>0\) and also that we are not in the trivial cases \(c=x_{0} \left( a\right) \) or \(c=x_{-1}\left( a\right) \) where the sequence keeps constant at the corresponding value. The proof is directly obtained from the following easily verifiable facts which are, indeed, the counterpart of the logarithm tower sequence behavior described in Remark 7:

  • If \(a\in ] 0,1[ \), the sequence \(\left( P_{n}\left( a,c\right) \right) _{n}\) jumps alternatively to both sides of \(x_{0}\left( a\right) \).

    • In the case \(a\in ] 0,1/{e^{e}}[ \), the subsequences of above and of below monotonically converge to \(P_{even}\left( a\right) \) and \(P_{odd}\left( a\right) \), respectively. Moreover, if the sequence \(\left( P_{n}\left( a,c\right) \right) _{n}\) starts in the interval \(\left[ P_{odd}\left( a\right) ,P_{even}\left( a\right) \right] \) (i.e., if \(c\in \left[ P_{odd}\left( a\right) ,P_{even}\left( a\right) \right] \)) their terms always stay in it while, if it starts outside this interval, the terms always stay out.

      For example, if the sequence starts with a positive initial data below \(P_{odd}\left( a\right) \), the subsequence of odd terms will converge decreasingly to \(P_{even}\left( a\right) \), and the sequence of even terms will converge increasingly to \(P_{odd}\left( a\right) \).

    • In the case \(a\in [ 1/e^{e},{1}[ \), the subsequences of above and of below monotonically converge to \(x_{0}\left( a\right) \).

  • The case \(a=1\) is trivial, specifically one has, for any \(c\in {\mathbb {R}}\), that \(\left( P_{n}\left( a,c\right) \right) _{n}=P\left( a,c\right) =1\) for all \(n\ge 1\).

  • If \(a\in ] 1,e^{1/e}] \), the sequence \(\left( P_{n}\left( a,c\right) \right) _{n}\) is monotone. Moreover:

    • In the case \(c<x_{0}\left( a\right) \) the sequence converges increasingly to \(x_{0}\left( a\right) .\)

    • In the case \(x_{0}\left( a\right)<c<x_{-1}\left( a\right) \) the sequence converges decreasingly to \(x_{0}\left( a\right) .\)

    • In the case \(c>x_{-1}\left( a\right) \) the sequence is increasing and diverges to \(+\infty \). \(\square \)

Remark 9

Although it is not evident, an alternative proof of Theorem 8 can also be obtained using the preliminary lemmas of [6] but, it is a key tool to know a priori the role of the functions \(P_{odd}\left( a\right) \), \(P_{even}\left( a\right) \), \(x_{0}\left( a\right) \), and \(x_{-1}\left( a\right) \).

Figure 3 shows in colors the basins of attraction of the power and logarithm towers, that is, the regions of points \(\left( a,c\right) \) and \(\left( a,b\right) \) where the power and tower sequences converge.

Fig. 3
figure 3

Basins of attraction of the power and logarithm towers

4 Applications to the Lambert W function sequences

The inverse of the real function \(f\left( y\right) =ye^{y}\), \(y\in {{{{\mathbb {R}}}}}\), is called the Lambert W function, it is a multivalued function because f is not injective over all \({{{{\mathbb {R}}}}}\). Nevertheless, f is injective on the intervals \(] -\infty ,-1[ \) and \([ -1,+\infty [ \). The inverse of f on the interval \([ -1,+\infty [ \) is a single-valued function defined on \([ -1/{e},+\infty [ \), denoted by \(W_{0}\) and called principal branch of the Lambert W function, and the inverse on the interval \(] -\infty ,-1[ \) is also a single-valued function defined on \(] -1/{e},0[ \), denoted by \(W_{-1}\) and called negative branch of the Lambert W function.

To compute the images \(W_{0}\left( z\right) \) and \(W_{-1}\left( z\right) \), one must solve the equation \(ye^{y}=z\), with unknown y and datum z, in the corresponding intervals.

In the case \(z\ne 0\) one has the following equivalence

$$\begin{aligned} ye^{y}=z\Leftrightarrow \frac{y}{z}=\left( e^{-z}\right) ^{y/z} \Leftrightarrow x=a^{x} \end{aligned}$$
(17)

where \(a=e^{-z}\) and \(x=\frac{y}{z}.\) Therefore, the images of the inverse functions are determined by the solutions of the equation \(x=a^{x}\), and vice versa, specifically:

  • \(W_{0}\left( z\right) =zx_{0}\left( e^{-z}\right) \) for \(z\in \left[ -1/{e},+\infty \right] \) or \(x_{0}\left( a\right) =\dfrac{W_{0}\left( -\ln a\right) }{-\ln a}\) for \(a\in ] 0,e^{1/e}] \backslash \left\{ 1\right\} \).

    The case \(a=1\) corresponds to \(z=0\) where \(x_{0}\left( 1\right) =0\) and \(W_{0}\left( 0\right) =0.\)

  • \(W_{-1}\left( z\right) =zx_{-1}\left( e^{-z}\right) \) for \(z\in ] {-1}/{e},0[ \) or \(x_{-1}\left( a\right) =\dfrac{W_{-1}\left( -\ln a\right) }{-\ln a}\) for \(a\in ] 1,e^{1/e}] \)

The previous assertions justify the notation \(x_{0}\left( a\right) \) and \(x_{-1}\left( a\right) \) in (15).

As we already commented in the introduction, equation

$$\begin{aligned} ye^{y}=z \end{aligned}$$
(18)

expressed in different ways can give rise to different types of sequences which are indeed closely related to the two tower sequences (see, for instance, [13]). These Lambert sequences are well known and used in the literature and our contribution will consist in specifying for which range of the initial data each sequence converges to its corresponding limit.

  • Equation (18) written as \(y=ze^{-y}\ \)suggests the iterative scheme (see expansion (98) in [13])

    $$\begin{aligned} y_{n}=ze^{-y_{n-1}} \end{aligned}$$
    (19)

    Observe that it is equivalent to \(\frac{y_{n}}{z}=e^{-y_{n-1}}=\left( e^{-z}\right) ^{y_{n}/z}\) and, for \(a=e^{-z}\) and \(c=\frac{y_{0}}{z}\), one has

    $$\begin{aligned} \frac{y_{n}}{z}=P_{n}\left( a,c\right) . \end{aligned}$$
  • Taking into account that \(ye^{y}=z\) implies \(\dfrac{z}{y}>0\) whenever \(y\not =0\), one can write Eq. (18) as \(y=\ln \left( \dfrac{z}{y}\right) \) which suggests the iterative scheme (see expansion (99) in [13])

    $$\begin{aligned} y_{n}=\ln \left( \dfrac{z}{y_{n-1}}\right) \end{aligned}$$
    (20)

    Observe that it is equivalent to \(\frac{y_{n}}{z}=\frac{1}{z}\ln \left( \dfrac{z}{y_{n-1}}\right) =\frac{1}{z}\ln \left( \left( \dfrac{y_{n-1}}{z}\right) ^{-1}\right) =\frac{1}{-z}\ln \left( \dfrac{y_{n-1}}{z}\right) =\frac{1}{\ln a}\ln \left( \dfrac{y_{n-1}}{z}\right) =\log _{a}\left( \dfrac{y_{n-1}}{z}\right) \) and, for \(a=e^{-z}\) and \(b=\frac{y_{0}}{z}\), one has

    $$\begin{aligned} \frac{y_{n}}{z}=L_{n}\left( a,b\right) . \end{aligned}$$
Fig. 4
figure 4

Basins of attraction of the Lambert sequences

Therefore, one has the following consequences from the results of Sect. 3.

Corollary 10

The Lambert sequences satisfy that:

  1. 1.

    If \(\frac{-1}{e}\le z<0\) and \(y_{0}>zx_{-1}\left( e^{-z}\right) =W_{-1}\left( z\right) \), the sequence (19) converges to

    $$\begin{aligned} y=zP\left( e^{-z},\frac{y_{0}}{z}\right) =W_{0}\left( z\right) \in [ -1,0[ . \end{aligned}$$
  2. 2.

    If \(0<z\le e\) and \(y_{0}\in {\mathbb {R}}\), the sequence (19) converges to

    $$\begin{aligned} y=zP\left( e^{-z},\frac{y_{0}}{z}\right) =W_{0}\left( z\right) \in ] 0,1] . \end{aligned}$$

    In the case \(z=0\), (19) converges to \(y=0=W_{0}\left( 0\right) \) for any \(y_{0}\in {\mathbb {R}}\).

  3. 3.

    If \(z>e\) and \(y_{0}\in ] zP_{odd}\left( e^{-z}\right) ,zP_{even}\left( e^{-z}\right) [ \), the sequence (20) converges to

    $$\begin{aligned} y=zL\left( e^{-z},\frac{y_{0}}{z}\right) =-\ln \left( L\left( e^{-z} ,\frac{y_{0}}{z}\right) \right) =W_{0}\left( z\right) \in ] 1,+\infty [ . \end{aligned}$$

    In the case \(z=e\), (20) converges to \(y=1=W_{0}\left( e\right) \) if, and only if, \(y_{0}=1\).

  4. 4.

    If \(\frac{-1}{e}\le z<0\) and \(y_{0}<zx_{0}\left( e^{-z}\right) =W_{0}\left( z\right) \), the sequence (20) converges to

    $$\begin{aligned} y=zL\left( e^{-z},\frac{y_{0}}{z}\right) =-\ln \left( L\left( e^{-z} ,\frac{y_{0}}{z}\right) \right) =W_{-1}\left( z\right) \in ] -\infty ,-1[ . \end{aligned}$$

Remark 11

From [11, Cor. 3] it is also obtained the convergence of the Lambert sequences for specific initial data, concretely, using our notation they proved that (19) converges to \(y=zP\left( e^{-z},1\right) \) with \(y_{0}=z\) whenever \(\frac{-1}{e}\le z\le e\), (20) converges to \(y=-\ln \left( L\left( e^{-z},\frac{1}{e}\right) \right) \) with \(y_{0}=\frac{z}{e}\) whenever \(z\ge e\) and, (20) converges to \(y=-\ln \left( L\left( e^{-z},e\right) \right) \) with \(y_{0}=ze\) whenever \(\frac{-1}{e}\le z<0\). Note that all these statements are particular cases of Corollary 10.

Figure 4 shows in colors the basins of attraction of the Lambert sequences, that is, the regions of points \(\left( z,y_{0}\right) \) where the sequences (19) and (20) converge.