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

\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}
\newtheorem{question}[theorem]{Question}

\begin{center}
\vskip 1cm{\LARGE\bf 
Transcendence of Values of the Iterated\\
\vskip .05in
Exponential Function at Algebraic Points
}
\large
\vskip 1cm
Hirotaka Kobayashi\\
Graduate School of Mathematics\\ Nagoya University\\ Furo-cho, Chikusa-ku \\
Nagoya 464-8602\\ Japan\\
\href{mailto:m17011z@math.nagoya-u.ac.jp}{\tt m17011z@math.nagoya-u.ac.jp}\\
\ \\
Kota Saito\\
Faculty of Pure and Applied Sciences\\ University of Tsukuba\\1-1-1 Tenodai, Tsukuba \\
Ibaraki 305-8571\\ Japan\\ 
\href{mailto:saito.kota.gn@u.tsukuba.ac.jp}{\tt saito.kota.gn@u.tsukuba.ac.jp}\\
\ \\
Wataru Takeda\\
Department of Applied Mathematics\\ Tokyo University of Science\\
 1-3 Kagurazaka, Shinjuku-ku \\ Tokyo 162-8601\\ Japan\\
\href{mailto:w.takeda@rs.tus.ac.jp}{\tt w.takeda@rs.tus.ac.jp}\\
\end{center}

\newpage

\begin{abstract}
 We say that the limit of a sequence of functions
\[
 x,\quad x^x, \quad x^{x^x},\ldots 
\]
 is the iterated exponential function, denoted by $h(x)$. 
 By a result of Barrow, this limit is convergent for every
 $x\in[e^{-e}, e^{1/e}]$.
 In this paper, we prove that, for each fixed integer $k\ge2$,
 the limit $h(A)$ is transcendental
 for all but finitely many algebraic numbers $A\in[e^{-e}, e^{1/e}]$ with $k=\min\{n\in\mathbb{N} \mid A^n\in\mathbb{\mathbb{Q}}\}$.
 Furthermore, let $Q(k)$ be the cardinality of exceptional points $A$. We prove that the ratio $Q(k)/\varphi(k)$ approaches $e-1/e$ as $k\rightarrow \infty$, where $\varphi(k)$ denotes Euler's totient function.
\end{abstract}





\section{Introduction}\label{section1}

We say that a complex number $\alpha$ is {\it algebraic} if there exists a non-zero polynomial $f(X)$ with rational coefficients such that $f(\alpha)=0$, and $\alpha$ is {\it transcendental} if $\alpha$ is not algebraic. Let $\mathbb{A}$ and $\mathbb{T}$ denote the set of all algebraic numbers and transcendental numbers, respectively.  A fundamental problem in transcendental number
theory is to determine the transcendence (or algebraicity) of a given number.

In 1934, Gelfond and Schneider (independently)
solved one of the big problems in the area,
called Hilbert's 7th problem.
\begin{theorem}[Gelfond-Schneider \cite{Gelfond1, Gelfond2, Schneider1, Schneider2}]\label{lma2}
If $\alpha \in\mathbb{A}\setminus\{0,1\}$ and $\beta\in \mathbb{A}\setminus \mathbb{Q}$, then $\alpha^\beta$ is transcendental. 
\end{theorem}
By using this result, we study the transcendence of the limit of a sequence 
\begin{equation}
\label{IE}
	 x,\quad x^x, \quad x^{x^x},\ldots.
\end{equation}
This limit is denoted by $h(x)$, called the {\it iterated exponential function}. Formally, the limit $h(x)$ can be written as
 \[
 h(x)=x^{x^{x^{\cdot^{\cdot^{\cdot}}} }}.
\]
The limit of a sequence \eqref{IE} is convergent for every  $e^{-e}\leq x\leq e^{1/e}$ from a result of Barrow \cite[Theorem~5]{Barrow},
and he also proved that 
\begin{equation}
\label{h1}
 h(x)=x^{h(x)}, \text{ and } \quad 1/e\leq h(x)\leq e. 
\end{equation}
for every $e^{-e}\leq x\leq e^{1/e}$.
We propose the following question:
\begin{question} 
Suppose $A$ is algebraic and $h(A)$ is convergent. Is $h(A)$ transcendental?
\end{question}
For some algebraic numbers $A$, the transcendence of $h(A)$ is already known from the following result of Sondow and Marques:
\begin{proposition}[{\cite[Corollary~4.2]{SondowMarques}}]\label{Prop1}
 Let $A\in [e^{-e},e^{1/e}]$. If either 
\begin{itemize}
\item[(i)] $A^n\in\mathbb{A}\setminus \mathbb{Q} $ for all $n\in \mathbb{N}$, or 
\item[(ii)] $A\in\mathbb{Q}\setminus \{1/4,1\}$,
\end{itemize}
 then $h(A)$ is transcendental. 
\end{proposition} 
 However, they did not study the case when there exists an integer $n\geq 2$ such that $A^n\in \mathbb{Q}$. This paper gives new results in this unknown case. 

To state our main theorems, we now define the function ${\rm ord}: \mathbb{A}\rightarrow \mathbb{N}\cup\{\infty\}$ to be 
\[
{\rm ord} (A)=\min\{n\in\mathbb{N} \: :\:  A^n\in\mathbb{\mathbb{Q}}\} 
\]
if there exists $n\in \mathbb{N}$ such that $A^n\in \mathbb{Q}$, and define ${\rm ord}(A)=\infty$ otherwise.  We say that ${\rm ord} (A)$ is the {\it order} of an algebraic number $A$. The first goal of this paper is to prove the following theorem.

\begin{theorem}\label{main1}
 Fix an integer $k\geq 2$. For every $A\in \mathbb{A}\cap [e^{-e},e^{1/e}]$ with ${\rm ord}(A)=k$, the limit $h(A)$ is transcendental, except possibly for $A\in \mathcal{E}(k)$, where
 \[
 \theta:=(\log2-1/e)^{-1}=3.074390\cdots,
 \]
 and
 \[
 \mathcal{E}(k):=\left\{\left(\frac{kt}{s}\right)^{\frac{s}{kt} }\ :\begin{array}{l}
 \ 1\leq t\leq \theta\log k,\ kt/e\leq s\leq kte,\ s,t \in\mathbb{N},\\ (kt)^{1/t}, s^{1/t}\in\mathbb{N},\ \gcd(kt,s)=1 
 \end{array}
 \right\}.
 \]
 \end{theorem}

We prove Theorem~\ref{main1} in Subsection~\ref{section4}. Moreover, for the case that $k$ is a square-free integer, we can characterize the set of all algebraic numbers $A$ of order $k$ such that the limit $h(A)$ is algebraic.
\begin{theorem}\label{th:main2nd}
If $k\geq 3$ is square-free, then
\[\left\{A\in \mathbb{A}\cap [e^{-e},e^{1/e}] :\begin{array}{l} h(A) \text{ is algebraic,}\\
{\rm ord} (A)=k
\end{array}\right\}=\left\{\left(\frac{k}{s}\right)^{\frac{s}{k}}: \begin{array}{l} k/e\leq s\leq ke,\\ 
\gcd(s,k)=1  
\end{array}\right\}.\]
\end{theorem}
\begin{remark}
We also get the result for $k=2$. The explicit form is stated after the proof of Theorem \ref{th:main2nd}. 
\end{remark}

We do not know whether the set $\mathcal{E}(k)$ is equal to the set of all algebraic numbers $A$ with order $k$ such that the limit $h(A)$ is algebraic. As we discussed previously, the case $k=1$ or $\infty$ was already proven by Sondow and Marques (Proposition~\ref{Prop1}). We define $\mathcal{E}(1)=\{1/4,1\}$ and $\mathcal{E}(\infty)=\emptyset$. From Theorem~\ref{main1} and Proposition~\ref{Prop1}, the limit $h(A)$ is transcendental except possibly for $A\in \mathcal{E}(k)$ for every $k\in \mathbb{N}\cup \{\infty\}$. 

It is clear that $\mathcal{E}(k)$ is a finite set for every $k\geq 1$.
Thus we can define the arithmetic function $Q(k)$ to be
\[
Q(k)=\#\{A\in \mathbb{A}\cap [e^{-e}, e^{1/e}]\: :\: h(A) \text{ is algebraic, and } {\rm ord}(A)=k \},
\]
where $\# X$ denotes the cardinality of $X$ for every finite set $X$. 

For every pair of functions $f(k),g(k)$ and for every non-negative function $h(k)$, we write $f(k)=g(k)+O(h(k))$ if there exists some constant $C>0$ such that $|f(k)-g(k)|\leq C h(k)$. Let $\varphi(k)$ be the number of positive integers up to a given integer $k$ that are relatively prime to $k$; this is called Euler's totient function. We find an asymptotic formula for $Q(k)$, where the main term is $(e-1/e)\varphi(k)$; furthermore, the ratio $Q(k)/\varphi(k)$ approaches
$e-1/e$ as $k\rightarrow \infty$. More precisely, we get the following result:
\begin{theorem}\label{main2.5}
For every $k\geq 3$, we have 
\begin{equation}\label{f1Th2.2}
	Q(k)/\varphi(k)=e-\frac{1}{e}+ O\left( k^{-1/2}\log\log k\right). 
\end{equation}
In particular, we have
\[
	\lim_{k\rightarrow \infty} \frac{Q(k)}{\varphi(k)}=e-\frac{1}{e}.
\]
\end{theorem}

\begin{remark}
We know that the limit $h(A)$ is transcendental for every $A\in \mathbb{A}\cap[e^{-e},e^{1/e}]$ with ${\rm ord}(A)=\infty$ from Proposition~\ref{Prop1}. Thus we might guess that $\lim_{k\rightarrow \infty} Q(k)=0$. However, Theorem~\ref{main2.5} implies that $\lim_{k\rightarrow \infty} Q(k)=\infty$.
\end{remark}

\begin{theorem}\label{top}
The exceptional set 
\[
\{A\in\mathbb{A}\cap [e^{-e}, e^{1/e}]\ :\ h(A) \text{ is algebraic} \}
\]
is dense in $[e^{-e},e^{1/e}]$.
\end{theorem}

If we fix the order of algebraic numbers, then we can find that the exceptional set is finite by Theorem~\ref{main1}. On the other hand, we see that the union 
\[
\bigcup_{k=1}^\infty \{A\in \mathbb{A}\cap [e^{-e}, e^{1/e}]\: :\: h(A) \text{ is algebraic, and } {\rm ord}(A)=k \}
\]
is dense in  $[e^{-e}, e^{1/e}]$ from Theorem~\ref{top}. 

In the above four results, we consider only the case where
$x$ is positive. We can extend the iterated exponential function \eqref{IE} to $\mathbb C$, and it is known that there exists a non-real number $x$ such that \eqref{IE} converges. 
Let \[\mathcal{R}=\{e^{te^{-t}} ~|~ |t| < 1\text{, or  $t$ is a root of unity}\}.\]
In 1983, Baker and Rippon \cite{br} showed that if $x\in \mathcal{R}$, the sequence \eqref{IE} converges to $e^t$. 
\begin{theorem}\label{hoyoyo} Let $x\in\mathbb A\cap\mathcal{R}$. 
Then if $h(x)$ is an algebraic number, then $x$ is real and positive.
\end{theorem}
This theorem makes our results valid for all $\mathbb A$ with the condition that the sequence $\eqref{IE}$ converges.
We show this result in Section \ref{section7}.

As one of the generalizations of these results, we also consider the case $x=\alpha^\beta$, where both $\alpha$ and $\beta$ are algebraic numbers with $\alpha\not\in\{0,1\}$.
If $\beta$ is not a rational number, then $\alpha^\beta$ is a transcendence number by Theorem \ref{lma2}. We characterize the pairs $(\alpha,\beta)$ such that $h(\alpha^\beta)$ is an algebraic number in Section \ref{section7}.

A complex-valued function $f(x)$ is called transcendental, if there exists no non-zero polynomial $P(y)$ with $\mathbb{C}(x)$ coefficients such that $P(f(x))\equiv0$. It is known that there are entire transcendental functions $f$ such that $f(\alpha)$ is an algebraic number for every
algebraic number $\alpha$ \cite{va}.
For transcendental functions $f$, the exceptional set is defined to be
\[\{\alpha\in\mathbb{A}~|~f(\alpha)\in\mathbb{A}\}.\]
In this paper, we also consider the exceptional set for the iterated exponential function.

We give some notation.
In this paper, the expression $a\mid b$ denotes that $b$ can be divided by $a$, and $p^k\parallel a$ denotes that $p^k\mid a$ and $p^{k+1}\nmid a$.

\section{Preliminary discussion}\label{lemmas}
To prove Theorem~\ref{main1}, \ref{th:main2nd}, and  \ref{main2.5}, we show the following lemmas. 

\begin{lemma}\label{lma1}
Let $x\ge 2$ be an integer, and let $a$ and $b$ be relatively prime positive integers. If $x^{a/b}$ is a positive integer, then $x^{1/b}$ is also a positive integer.
\end{lemma}
\begin{proof}
Let $y=x^{a/b}$. Note that $y\in \mathbb{N}$. From the prime factorization, it follows that $x=p_1^{\alpha_1}\cdots p_n^{\alpha_n}$ and $y=p_1^{\beta_1}\cdots p_n^{\beta_n}$ for some prime numbers $p_1,\ldots, p_n$ and positive integers $\alpha_1,\ldots, \alpha_n, \beta_1,\ldots, \beta_n$. This yields that $\beta_j b= \alpha_j a$ for every $1\leq j\leq n$. From $\gcd(a,b)=1$, it is obtained that $b \mid \alpha_j$ for every $1\leq j\leq n$. Thus we conclude $x^{1/b}\in \mathbb{N}$.    
\end{proof}

\begin{lemma}\label{lma1.5} 
Let $A\in \mathbb{A}\setminus \{0\}$ and $k\geq 1$. If $A^k\in\mathbb{Q}$, 
then ${\rm ord}(A)\mid k$.
\end{lemma}

\begin{proof} We define $\mathbb{A}^\times$ and $\mathbb{Q}^\times$ to be the multiplicative group $\mathbb{A}$ and $\mathbb{Q}$, respectively. Let $\overline{B}\in\mathbb{A}^\times/\mathbb{Q}^\times$ be the equivalent class of $B\in\mathbb{A}$. Then the cardinality of the cyclic group $\langle \overline{A}\rangle=\{\overline{}{A}^n\in\mathbb{A}^\times /\mathbb{Q}^\times\: :\: n\in\mathbb{Z} \}$ is equal to ${\rm ord} (A)$, and $(\overline{A})^k=\overline{1}$. By the theory of groups, we obtain ${\rm ord}(A)\mid k$.
\end{proof}


\begin{lemma}\label{lma3}
Let $A\in \mathbb{A}\cap [e^{-e}, e^{1/e}]$. If $h(A)\in \mathbb{R}\setminus \mathbb{Q}$, then $h(A)\in \mathbb{T}$.
\end{lemma}
\begin{proof}
Assume that $h(A)\in \mathbb{A}$. Then $1/h(A)\in \mathbb{A}\setminus \mathbb{Q}$ since the same is true for $h(A)$.  From Theorem~\ref{lma2}, we see that $h(A)^{1/h(A)}$ is transcendental, but this is a contradiction by  \eqref{h1}.   
\end{proof}

\section{Proof of main theorems}
\subsection{Proof of Theorem~\ref{main1}}\label{section4}



\begin{proof}[Proof of Theorem~\ref{main1}]
Fix an integer $k\geq 2$. Assume that $h(A)$ is rational. The goal of this proof is to show that $A\in \mathcal{E}(k)$ from Lemma~\ref{lma3}. It can be written as $h(A)=a/b$ for some $a,b\in \mathbb{N}$ with $\gcd(a,b)=1$. Since ${\rm ord}(A)=k$, it also can be written as $A=(x/y)^{1/k}$ for some $x,y\in \mathbb{N}$ with $\gcd(x,y)=1$.  From \eqref{h1}, the equation
\begin{equation}\label{C4}
	 \left(\frac{a}{b}\right)^{ \frac{b}{a} }={\left(\frac{x}{y}\right)}^{\frac{1}{k}}
\end{equation}
holds. From $\gcd(a,b)=\gcd(x,y)=1$ and \eqref{C4}, it follows that 
\begin{equation}\label{pf1.1}
a^{bk}=x^a,\quad b^{bk}=y^a.
\end{equation} 
If $x=1$, then it is easily seen that $a=1$ from \eqref{pf1.1}. This does not happen since $k\mid a$ by Lemma~\ref{lma1.5}. Thus we may assume that $x\geq 2$. 
Let $t=a/k$. We next show that $1\leq t\leq \theta\log k$. From $k\mid a$, the integer $t$ is a positive integer, and $\gcd(t,b)=1$ holds.  From \eqref{pf1.1}, it is seen that $x^{t/b}/t=k$. From Lemma~\ref{lma1}, we have $x^{1/b}\in \mathbb{N}$. Therefore $x$ can be written as $x=x_0^b$ for some positive integer $x_0$. We see that $x_0\neq 1$ from $x\geq 2$. Thus $x^{1/b}=x_0\geq 2$. Therefore, we have
\[
 \frac{2^t}{t}\leq \frac{x^{t/b}}{t}=k,
\]
which implies that
\[
	 (\log2-1/e)\: t \leq \log \frac{2^t}{t} \leq \log k.
\]
Thus we have $1\leq t\leq \theta \log k$, where recall $\theta=(\log2-1/e)^{-1}$.

Let $s=b$. We find that $h(A)=a/b=kt/s$. From \eqref{h1}, we have $kt/e\leq s\leq kte$. 


From the above discussion, it follows that 
\begin{gather*}
1\leq t\leq \theta \log k,\quad kt/e\leq s\leq tke,\quad s,t\in \mathbb{N}, \\
 x=a^{bk/a}=(kt)^{s/t},\quad y=b^{bk/a}=s^{s/t},\quad \gcd(kt,s)=1, \\
 A=\left(\frac{x}{y}\right)^{\frac{1}{k}}= \left(\frac{kt}{s}\right)^{\frac{s}{kt} }.
\end{gather*}
Lemma~\ref{lma1} and $\gcd(kt,s)=1$ imply that $(kt)^{1/t}$ and $s^{1/t}$ are positive integers.  Therefore, we conclude $A\in \mathcal{E}(k)$.
\end{proof}






\subsection{Proof of Theorem~\ref{th:main2nd}}
 Let $f(y)=y^{1/y}$ on $1/e\leq y \leq e$. The function $f$ is an injection. Indeed, 
 \[
 f'(y)=y^{1/y-2}(1-\log y)  
 \]
 holds from taking the logarithmic derivative. Therefore $f'(y)>0$ for every $y\in (1/e,e)$, which means that $f$ is an injection. Hence we immediately get the following lemma.
 
 \begin{lemma}\label{lma4}
  Let $A\in \mathbb{A}\cap [e^{-e},e^{1/e}]$. If there exists $q\in \mathbb{Q}\cap [1/e,e]$ such that $A=q^{1/q}$, then $h(A)=q$. 
 \end{lemma}

\begin{proof}[Proof of Theorem~\ref{th:main2nd}]
First, we prove that the set on the left-hand side set contains the set on the right-hand side.
Since $k/e\leq s \leq ke$, we obtain $(k/s)^{s/k}\in [e^{-e},e^{1/e}]$. By Lemma \ref{lma4}, we have $h((k/s)^{s/k})=k/s$.
When we assume that $\mathrm{ord}(A)<k$, i.e. there is an integer $l$ such that
\begin{equation*}
1\leq l<k \quad, \text{ and} \quad \left(\frac{k}{s}\right)^{\frac{sl}{k}}=\frac{x}{y} \qquad (\gcd(x,y)=1),
\end{equation*}
we see that
\begin{equation*}
k^{sl}=x^k,
\end{equation*}
because $\gcd(s,k)=1$ and $\gcd(x,y)=1$. Therefore $k$ divides $l$, because $\gcd(s,k)=1$ and $k$ is square-free. This is a contradiction.
Hence we have $\mathrm{ord}(A)=k$.

Next, we prove that the set on the left-hand side is a subset of the set on the right-hand side.
By Lemma \ref{lma3}, we can see that $h(A) \in \mathbb{Q}$.
When we put
\begin{equation*}
h(A)=\frac{a}{b} \qquad (\gcd(a,b)=1),
\end{equation*}
we can obtain
\begin{equation*}
A=\left(\frac{a}{b}\right)^{\frac{b}{a}} \qquad (a/e\leq b\leq ae).
\end{equation*}
Now we prove $a=k$.
It also can be written as $A=(x/y)^{1/k}$ with $\gcd(x,y)=1$ because $\mathrm{ord}(A)=k$.
Therefore
\begin{equation*}
\left(\frac{a}{b}\right)^{\frac{b}{a}}=\left(\frac{x}{y}\right)^{\frac{1}{k}},
\end{equation*}
and we have
\begin{equation*}
a^{kb}=x^a.
\end{equation*}
We can write $a=km \ (m\in \mathbb{N})$ and the above equation can be rewritten as
\begin{equation*}
(km)^b=x^m.
\end{equation*}
Since $k$ is square-free, if a prime $p$ divides $k$ but not $m$, then $m$ divides $b$. However we put $\gcd(a,b)=1$. Hence this is a contradiction except possibly for the case of $m=1$. If there is a prime $p$ such that 
\begin{equation*}
p \nmid k \quad \text{and} \quad p^{\alpha}\parallel m \ (\alpha \geq 1),
\end{equation*}
then $m$ divides $\alpha$ since $\gcd(b,m)=1$. Therefore $p^{\alpha}$ divides $\alpha$, but that is impossible.
Hence $k$ and $m$ are not co-prime or $m=1$.
We assume that $k$ and $m$ are not co-prime and $k\ge3$. Then there is a prime $p>2$ such that
\begin{equation*}
p^{\alpha+1} \parallel km \ (\alpha \geq 1).
\end{equation*}
Since $\gcd(b,m)=1$, the integer $m$ divides $\alpha+1$, and therefore $p^{\alpha}$ divides $\alpha+1$. But this is impossible.
Therefore $m=1$. 
\end{proof}

For the case $k=2$, the triple $(m,p,\alpha)=(2,2,1)$ satisfies $p^{\alpha+1} \parallel km$. Then, we have $a=4$. By the assumption, an odd integer $b$ satisfies $4/e\le b \leq 4e$ and $b^{b}=y^2$. Therefore, $b=9$. In this case, we confirm that $h(\left(4/9\right)^{9/4})=4/9$ and $\left(4/9\right)^{9/4}\in Q(2)$. 
Thus, there is only one exceptional element $(2/3)^{9/2}\in Q(2)$.


\subsection{Proof of Theorem~\ref{main2.5}}

In order to estimate the value of $Q(k)$, we need some evaluations of arithmetic functions. Let $d(n)$ be the number of divisors of $n$, $\omega (n)$ be the number of distinct prime factors of $n$, and $\gamma$ be the Euler-Mascheroni constant.

\begin{lemma} We have the following facts.
\begin{itemize}
\item
{\rm \cite[Theorem~2.9]{MontgomeryVaughan}} For every $n\geq 3$, we have
\begin{equation}\label{ArithFunc3}
	\varphi (n)\geq \frac{n}{\log\log n} \left(e^{-\gamma} +O\left(\frac{1}{\log\log n}\right) \right).
\end{equation}

\item
{\rm \cite[Theorem~2.11]{MontgomeryVaughan}} For every $n\geq 3$, 
\begin{equation} \label{ArithFunc2.1}
	\log d(n)\leq \frac{\log n}{\log\log n}\left(\log2 +O\left(\frac{1}{\log\log n}\right)\right),
\end{equation}

\item
{\rm\cite[Theorem~3.1]{MontgomeryVaughan}} Let $P$ be a positive integer. For every $x\in\mathbb{R}$, and every $y\geq 0$,
\begin{equation}\label{ArithFunc1}
	\sum_{\substack{x<n\leq x+y \\ \gcd(n,P)=1}}1=\frac{\varphi(P)}{P}y + O\left(2^{\omega(P)}\right).
\end{equation}
\end{itemize}
\end{lemma}

\begin{remark}
From \eqref{ArithFunc2.1}, there exists $C>0$ such that for every $n\geq 3$, we have
\begin{equation}\label{ArithFunc2}
	d(n)\leq \exp\left( \frac{C\log n}{\log\log n} \right).
\end{equation}
We can take $C=1.5379$ from the result of Nicolas and Robin \cite{NicolasRobin}, but we do not use this explicit value. 

Since
$2^{\omega(P)}\leq d(P)$ holds, by \eqref{ArithFunc1} we have
\begin{equation}\label{ArithFunc4}
	\sum_{\substack{x<n\leq x+y \\ \gcd(n,P)=1}}1=\frac{\varphi(P)}{P}y + O\left(d(P)\right).
\end{equation}
For every function $f(k)$ and for every non-negative function $g(k)$, we define $f(k)\ll g(k)$ to mean $f(k)=O(g(k))$.  
\end{remark}




\begin{proof}[Proof of Theorem~\ref{main2.5}]
 Let $\mathcal{E}(k)$ be the set in Theorem~\ref{main1}. From Theorem~\ref{main1} and Eq.~\eqref{ArithFunc4}, it follows that
\begin{align*}
	Q(k)
	&\leq \#\mathcal{E}(k) \\
	& \leq \#\{(u,t)\in \mathbb{N}^2\colon 1\leq t\leq \theta\log k,\ (kt/e)^{1/t}\leq u\leq (kte)^{1/t},\ \gcd(k,u)=1  \} \\
	&=\sum_{1\leq t\leq \theta\log k} \sum_{\substack{\quad (tk/e)^{1/t}\leq u\leq (tke)^{1/t} \\ \gcd(k,u)=1}}1 \\
	&=\sum_{1\leq t\leq \theta\log k} \left(\left((tke)^{1/t} -\left(\frac{tk}{e}\right)^{1/t}\right)\frac{\varphi(k)}{k} + O(d(k))\right)\\
	&=\left(e-\frac{1}{e}\right)\varphi(k)+ \left(\sum_{2\leq t\leq \theta\log k} \left((tke)^{1/t} -\left(\frac{tk}{e}\right)^{1/t}\right)\frac{\varphi(k)}{k}  \right)+O(d(k)\log k ).
\end{align*}
By the mean value theorem and the fact $t^{1/t}$ is bounded, the middle term is dominated by
\begin{align*}
\frac{\varphi(k)}{k} \sum_{2\leq t\leq \theta\log k} \left(ke-\frac{k}{e}\right)\frac{(k/e)^{1/t-1}}{t}\ll \varphi(k)k^{-1/2}\log\log k.
\end{align*}
By \eqref{ArithFunc3} and \eqref{ArithFunc2}, we have
\begin{align*}
\varphi(k)k^{-1/2}\log\log k+d(k)\log k \ll \varphi(k) k^{-1/2}\log \log k.  
\end{align*}
Therefore there exists a constant $C_1>0$ such that
\[
	Q(k)/\varphi(k)-\left(e-\frac{1}{e}\right)\leq C_1  k^{-1/2}\log\log k.
\]
We next find a lower bound for $Q(k)$.  Let 
\begin{equation}\label{Ezero}
	\mathcal{E}_0(k)=\left\{ \left(\frac{k}{s}\right)^{\frac{s}{k}}\left| \begin{array}{l}
	k/e \leq s\leq ek,\ s\in\mathbb{N},\ \gcd(k,s)=1,\\
	r\mid k \text{ and } r\neq 1 \Rightarrow s^{1/r}\notin \mathbb{N} 
	\end{array}\right.\right\}
\end{equation}
for every $k\geq 3$. Then $\mathcal{E}_0(k)\subset[e^{-e},e^{1/e}]$ holds for every $k\geq 3$. Indeed, since $f(x)=x^{1/x}$ is increasing on $x\in [1/e,e]$, we have
\[
	e^{-e}\leq \left(\frac{k}{s}\right)^{\frac{s}{k}}\leq e^{1/e} 
\] 
for every $1/e\leq s/k\leq e$. Therefore $h(A)$ can be defined for every $A\in\mathcal{E}_0$. Fix $A\in \mathcal{E}_0$ and write $A=(k/s)^{s/k}$. We next show that ${\rm ord}(A)=k$. It follows that
\[
	 \left(\frac{k}{s}\right)^{\frac{s\cdot {\rm ord}(A)}{k}}=A^{{\rm ord}(A)}=\frac{x}{y}
\] 
for some relatively prime positive integers $x$ and $y$. From Lemma~\ref{lma1.5}, we obtain ${\rm ord}(A)\mid k$. Since $\gcd(x,y)=\gcd(k,s)=1$ implies that
\[
	s^\frac{s}{k/{\rm ord}(A)}=y,
\]
it follows that $s^{\frac{1}{k/{\rm ord}(A)}} \in \mathbb{N}$ from Lemma~\ref{lma1} and the fact that $\gcd(k,s)=1$.   Therefore, the definition of $\mathcal{E}_0(k)$ leads to ${\rm ord}(A)=k$. Furthermore, the limit $h(A)$ is rational from Lemma~\ref{lma4}. Hence we get the evaluation
\[
	\#\mathcal{E}_0(k)\leq Q(k).
\]
We now find a lower bound for $\#\mathcal{E}_0(k)$. It is obtained that
\begin{align*}
\#\mathcal{E}_0(k) 
 &\ge \sum_{\substack{k/e\leq s\leq ek \\ \gcd(k,s)=1}} 1 
- \sum_{\substack{r\mid k\\ r\neq 1}}  \sum_{\substack{(k/e)^{1/r}\leq u\leq (ek)^{1/r} \\ \gcd(k,u)=1}} 1.
\end{align*} 
From \eqref{ArithFunc4}, the first sum is equal to 
\begin{equation}\label{firstterm}
	\left(e-\frac{1}{e}\right)\varphi(k) +O\left( d(k) \right),
\end{equation}
and the second sum is equal to
\begin{align}\label{secondterm1}
\sum_{\substack{r\mid k\\ r\neq 1}} \left((ek)^{1/r}-\left(\frac{k}{e}\right)^{1/r}\right) \frac{\varphi(k)}{k}   +O(d(k)^2).
\end{align}
By the mean value theorem and the estimate \eqref{ArithFunc2}, this sum is dominated by 
\begin{align}\label{secondterm2} 
\frac{\varphi(k)}{k} \sum_{\substack{r\mid k\\ r\neq 1}}
\frac{1}{r}(k/e)^{1/r} &\ll  \frac{\varphi(k)}{k}k^{1/2}\sum_{r|k}\frac{1}{r}\leq
\frac{\varphi(k)}{k}k^{1/2} \frac{k}{\varphi(k)}=k^{1/2}.
\end{align}
Therefore, by combining \eqref{firstterm}, \eqref{secondterm1}, and \eqref{secondterm2}, we have
\[
\# \mathcal{E}_0(k) /\varphi(k)=e-\frac{1}{e}+O(d(k)^2/\varphi(k)+k^{1/2}/\varphi(k)). 
\]
Hence, by \eqref{ArithFunc3} and \eqref{ArithFunc2}, there exists $C_2>0$ such that
\[
-C_2k^{-1/2}\log\log k\leq Q(k)/\varphi(k) -\left(e-\frac{1}{e}\right)
\]
for every $k\geq 3$. Therefore we obtain 
\[
Q(k)/\varphi(k)=e-\frac{1}{e}+O\left(k^{-1/2}\log\log k \right).
\]
Furthermore, we find that $Q(k)/\varphi(k)\rightarrow e-\frac{1}{e}$ as $k\rightarrow \infty$ from \eqref{ArithFunc3}.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{top}]
Let $\mathcal{E}=\{A\in\mathbb{A}\cap [e^{-e}, e^{1/e}]\colon h(A) \text{ is algebraic} \}$, and let $f(x)=1/x^x$. By the definition \eqref{Ezero}, we have
\[
    \left\{ f(p/2^k)  \colon  k\geq 2, \ p \text{ is odd prime}, 1/e\leq p/2^k\leq e \right\} \subseteq  \bigcup_{k=3}^\infty  \mathcal{E}_0(k) \subseteq  \mathcal {E}. 
\]
Note that the function $f(x)=1/x^x$ is a homeomorphism from $[1/e,e]$ into $[e^{-e}, e^{1/e}]$. Thus it is sufficient to show that the set
\[ 
\mathcal{F}:= \left\{ p/2^k\in \mathbb{Q}  : \ k\geq 2,\ p \text{ is odd prime} \right\}
\]
is dense in $(0,\infty)$. Here fix real numbers $x>0$ and $\epsilon>0$. It is clear from \cite[Theorem~6.9]{MontgomeryVaughan} that if $y$ is a sufficiently large real number, then there exists an odd prime number $p$ such that $p\in [y,y+y/\log y]$. Therefore if we choose a sufficiently large integer $k=k(x,\epsilon)$, then we can find an odd prime number $p$ such that
\[
(x-\epsilon)2^{k}< p< (x+\epsilon)2^{k}.    
\]
Then the following inequality holds:
\[
|x-p/2^k|<\epsilon, 
\]
which implies that $\mathcal{F}$ is dense in $(0,\infty)$. 
\end{proof}


\section{Iterated exponential on $(0,e^{-e})$}


Barrow \cite{Barrow} showed that $h(x)$ does not converge on the interval $(0,e^{-e})$, but he proved that sequences of the functions
\begin{equation}\label{oddexp}
x,\quad x^{x^x},\quad x^{x^{x^{x^x}}},\cdots 
\end{equation}
and
\begin{equation}\label{evenexp}
x^x,\quad x^{x^{x^x}}, \quad  x^{x^{x^{x^{x^x}}}},\cdots
\end{equation}
are convergent for every $x\in(0,e^{-e})$. We define $h_o(x)$ and $h_e(x)$ to be the limits of the above sequences \eqref{oddexp} and \eqref{evenexp}, respectively. We say that $h_o(x)$ is the odd iterated exponential function and $h_e(x)$ is the even iterated exponential function. Note that these functions can be defined on $(0,e^{-e})$. Barrow proved that
\begin{gather}\label{OddEvenEqs}
h_o(x)=x^{h_e(x)},\quad h_e(x)=x^{h_o(x)}, \quad 0<h_o(x)<\frac{1}{e}<h_e(x)<1
\end{gather}
 for every $x\in (0,e^{-e})$. We define
 \[
 R(k)=\#\{A\in \mathbb{A}\cap (0,e^{-e})\::\: \text{$h_o(A)$ and $h_e(A)$ are algebraic, and } {\rm ord}(A)=k\}.
 \]
\begin{question}\label{finiteness} Is $R(k)$ finite? If so, can we find an asymptotic formula of $R(k)$?
\end{question}

The goal of this section is to give the affirmative answer to Question~\ref{finiteness}. More precisely, we get the following results:

\begin{theorem}\label{main6.1} Let $A$ be an algebraic number in the interval $(0,e^{-e})$. Then $h_o(A)$ and $h_e(A)$ are algebraic if and only if there exists a positive integer $v$ such that
\begin{equation}\label{FormulaOfA}
 A=\left(\frac{v}{v+1}\right)^{(v+1)\left(\frac{v+1}{v}\right)^{v}}.
\end{equation}
\end{theorem}

From the above theorem, it follows that
\[
    R(k)=\#\left\{ v\in \mathbb{N}\ \colon\ {\rm ord}\left( \left(\frac{v}{v+1}\right)^{(v+1)\left(\frac{v+1}{v}\right)^{v}}\right)=k \right\}.
\]


\begin{theorem}[the answer to Question~\ref{finiteness}]\label{main6.2}
We have
\[
R(k)=
\begin{cases}
 1, & \exists v\in \mathbb{N} \text{ {\rm s.t.} } k=v^v;\\
 0, & \text{\rm  otherwise.}
\end{cases}
\]
\end{theorem}


In order to prove the results, we first show the following lemma:

\begin{lemma}\label{OddEven}
Let $A\in \mathbb A\cap (0,e^{-e})$. If $h_o(A)$ or $h_e(A)$ is irrational, then $h_o(A)$ or $h_e(A)$ is transcendental.
\end{lemma}

\begin{proof}
 If $h_o(A)$ is a transcendental number, then we immediately get this lemma. Thus we may assume that $h_o(A)$ is algebraic. It follows from \eqref{OddEvenEqs} that $h_e(A)=A^{h_o(A)}$. Therefore $h_e(A)$ is transcendental from Theorem~\ref{lma2}. 
\end{proof}

 By the result of Hurwitz \cite{Hurwitz}, we obtain that
\begin{lemma}\label{x^y=y^x}
All solutions of the Diophantine equation
\begin{equation}\label{Ber1}
x^y=y^x,\quad x,y\in\mathbb{Q},\quad x>y>0
\end{equation}
are 
\begin{equation}\label{sol1}
x=(1+1/v)^{1+v},\quad y=(1+1/v)^{v} 
\end{equation}
for all $v\in \mathbb{N}$.
\end{lemma}
We refer to the paper of Anderson \cite{Anderson} for readers
who want to know the background of the equation \eqref{Ber1}.  
\begin{proof}[Proof of Theorem~\ref{main6.1}]
Assume that $h_o(A)$ and $h_e(A)$ are algebraic. From Lemma~\ref{OddEven}, the limits $h_o(A)$ and $h_e(A)$ are rational. From \eqref{OddEvenEqs}, we have 
\[
    (1/h_o(A))^{1/h_e(A)}=(1/h_e(A))^{1/h_o(A)}.
\]
It follows from Lemma~\ref{x^y=y^x} that
\[
    h_o(A)=(1+1/v)^{-1-v},\quad h_e(A)=(1+1/v)^{-v}
\]
for some $v\in \mathbb{N}$. Thus the formula \eqref{FormulaOfA} is obtained from $A=h_o(A)^{1/h_e(A)}$. \end{proof}

To prove the converse assertion, we shall prepare several lemmas.
\begin{lemma}[cf. Lemma \ref{x^y=y^x}]
\label{add:lem1}
If $(x,y)\in \mathbb{R}^2$ with $0<y<x$ is a solution to
\begin{equation}
    \label{add:eq1}
    x^y=y^x,
\end{equation}
    then there exists a positive $t>0$ such that $y=(1+1/t)^t$, $x=(1+1/t)^{t+1}$.
\end{lemma}
\begin{proof}
    Let $t=\frac{y}{x-y}>0$. Then, we have $x=(1+1/t)y$. By \eqref{add:eq1}, we  compute as
    \begin{align*}
        y^{(1+1/t)y}=\left(\left(1+\frac{1}{t}\right)y\right)^y &\iff y^{1/t}=\left(1+\frac{1}{t}\right)\iff y=\left(1+\frac{1}{t}\right)^t,
    \end{align*}
    which implies $x=(1+1/t)y=(1+1/t)^{t+1}$.
\end{proof}
\begin{lemma}
    \label{add:lem2}
    For every $t>0$, we have 
    \[\frac{1}{t+1}-t\left(\log\left(1+\frac{1}{t}\right)\right)^2>0.\]
\end{lemma}
\begin{proof}
    Let \[G(t)=\frac{1}{t+1}-t\left(\log\left(1+\frac{1}{t}\right)\right)^2.\]
    Then, we have
    \begin{align*}
        G'(t)&=-\frac{1}{(t+1)^2}-\left(\log\left(1+\frac{1}{t}\right)\right)^2+2\log\left(1+\frac{1}{t}\right)\frac{1}{t+1}\\
        &=-\left(\frac{1}{t+1}-\log\left(1+\frac{1}{t}\right)\right)^2<0.
    \end{align*}
    Combining this with $\lim_{t\rightarrow0}G(t)=1$ and $\lim_{t\rightarrow\infty}G(t)=0$, we confirm that $G(t)>0$.
\end{proof}
\begin{lemma}
    \label{add:lem3}
    For every $t>0$, let 
    \[f(t)=\left(\frac{t}{t+1}\right)^{(t+1)(\frac{t+1}{t})^t}.\]
    Then, $f(t)$ is monotonically increasing on $t>0$.
\end{lemma}
\begin{proof}
    Let $g(t)=-\log f(t)$. It suffices to show that $g(t)$ decreases monotonically. The logarithmic derivative leads that 
    \begin{align*}
        \frac{g'(t)}{g(t)}&=\log\left(1+\frac{1}{t}\right)-\frac{1}{t(t+1)\log(1+1/t)}\\
        &=\frac{t(t+1)(\log(1+1/t))^2-1}{t(t+1)\log(1+1/t)}<0.
    \end{align*}
    Since $g(t)>0$, one confirms that $g'(t)<0$ if and only if $G(t)$ as in Lemma \ref{add:lem2} is positive. Lemma \ref{add:lem2} ensures that $G(t)>0$. 
    Therefore $f(t)$ is monotonically increasing on $t>0$.
    \end{proof}
    \begin{proposition}
         \label{add:prop4}
         If \[A=\left(\frac{v}{v+1}\right)^{(v+1)\left(\frac{v+1}{v}\right)^{v}}\]
         for some $v\in \mathbb N$, then $h_o(A)=(1+1/v)^{-1-v}$ and $h_e(A)=(1+1/v)^{-v}$ which are algebraic.
    \end{proposition}
    \begin{proof}
        By \eqref{OddEvenEqs}, we have $h_o(A)^{1/h_e(A)}=h_e(A)^{1/h_o(A)}$ and $h_o(A)<h_e(A)$. This yields that 
        \begin{align*}
            \left(\frac{1}{h_o(A)}\right)^{1/h_e(A)}=\left(\frac{1}{h_e(A)}\right)^{1/h_o(A)}=\frac{1}{A}, \quad 1/h_e(A)<1/h_o(A)
        \end{align*}
        By combining this with Lemma \ref{add:lem1}, there exists a real number $t>0$ such that 
        \[1/h_e(A)=(1+1/t)^{t},\quad 1/h_o(A)=(1+1/t)^{t+1}.\]
        Since $A=h_o(A)^{1/h_e(A)}$, we have
        \[\left(\frac{t}{t+1}\right)^{(t+1)\left(\frac{t+1}{t}\right)^{t}}=A=\left(\frac{v}{v+1}\right)^{(v+1)\left(\frac{v+1}{v}\right)^{v}}.\]
        Lemma \ref{add:lem3} leads to $t=v$.
        Thus, we obtain that $h_o(A)=(1+1/v)^{-1-v}$ and $h_e(A)=(1+1/v)^{-v}$. As $v\in \mathbb N$, both $h_o(A)$ and $h_e(A)$ are algebraic. 
    \end{proof}

We have now completed the proof of Theorem~\ref{main6.1}.

\begin{proof}[Proof of Theorem~\ref{main6.2}]
We find the solutions of the Diophantine equation
\begin{equation}\label{Diophantine2}
\left(\frac{v}{v+1}\right)^{(v+1)\left(\frac{v+1}{v}\right)^{v}}=\left(\frac{x}{y}\right)^{1/k},\quad v,x,y\in \mathbb{N},\quad \gcd(x,y)=1.
\end{equation}
Let $A$ be the left-hand side of \eqref{Diophantine2}. It follows that $A^{v^v}\in \mathbb{Q}$. From Lemma~\ref{lma1.5}, we have $k\:|\: v^v$. Let $t=v^v/k\in \mathbb{N}$. It is seen that
\[
    v^{(v+1)^{v+1}}=x^t,\quad (v+1)^{(v+1)^{v+1}}=y^t.
\]
There exists positive integers $a$ and $b$ such that 
\[
    v=a^t,\quad v+1=b^t
\]
from Lemma~\ref{lma1} and $\gcd(v,v+1)=1$. Assume that $t\geq 2$. Then it follows from $b>a$ that
\[
    1=(b-a)(b^{t-1}+b^{t-2}a+\cdots+a^{t-1})\geq t,
\]
which is a contradiction. Therefore $t=1$, which means that
\[
    k=v^v.
\]
\end{proof}

\section{Generalized case}\label{section7}
In this section, $x$ denotes a complex number. First, we show Theorem \ref{hoyoyo}. There are many results about convergence of iterated exponential $\eqref{IE}$.
Carlsson \cite{c07} showed that convergence of \eqref{IE} can occur only if $x\in R=\{e^{te^{-t}} ~|~ |t|\le1\}$ in 1907. 
In 1983, Baker and Rippon showed the following theorem.
\begin{theorem}[Baker and Rippon \cite{br}]\label{Theorem-BakerRippon}
\label{brr}
Let \[\mathcal{R}=\{e^{te^{-t}} ~|~ |t| < 1\text{, or  $t$ is a root of unity}\}.\]
If $x\in \mathcal{R}$, the sequence \eqref{IE} converges to $e^t$. 
For almost all $t$ on the unit circle $|t|=1$ in the sense of the Lebesgue measure, the sequence \eqref{IE} diverges.
\end{theorem}
An alternative proof of Theorem \ref{brr} using Lambert's $W$ function was given by Galidakis \cite{ga05}.
In the following, we denote by $x=e^{te^{-t}}$ an element of $\mathcal R$ and consider whether the value $h(x)$ is a transcendental number.
The Lindemann theorem states that if $t\in\mathbb A\setminus\{0\}$, then $h(x)=e^t$ is transcendental. Therefore, the limit $h(x)$ can be an algebraic number only if $t$ is either zero or a transcendental number. Moreover, we can show a similar lemma to Lemma \ref{lma3} by the same argument of the proof of Lemma \ref{lma3}.
\begin{lemma}
Let $x\in \mathbb{A}\cap \mathcal R$. If $h(x)\not\in \mathbb{Q}$, then $h(x)\in \mathbb{T}$.
\end{lemma}
Let $x\in \mathbb A\cap\mathcal R$.
Since $|t|\le1$, if we assume $h(x)=e^t\in\mathbb Q$, then $t\in \mathbb R$ and $x$ is positive. Thus, there are no algebraic non-positive numbers $x\in \mathbb A\cap\mathcal R$ such that $h(x)$ is an algebraic number. This shows Theorem \ref{hoyoyo} and our results can be extended to all algebraic numbers $A\in \mathbb A\cap\mathcal R$ such that $h(A)$ converges.

Next, we consider the case $x=\alpha^\beta$, where both $\alpha\not=1$ and $\beta$ are real algebraic numbers. Since if $\beta$ is rational then $x$ becomes algebraic, this is one of the generalizations of our results. From Theorem \ref{brr}, 
if $\beta=\frac{te^{-t}}{\log \alpha}$ with $-1\le t\le1$, then the sequence \eqref{IE} converges to $e^{t}$. In the following, we specify the form of $t$.
\begin{lemma}
\label{53}
Let $\alpha\not=1,\beta$ be real algebraic numbers.
For $\alpha^\beta\in \mathcal R$, we have $\beta h(\alpha^\beta)\not\in \mathbb{Q}$ if and only if $h(\alpha^\beta)\in \mathbb{T}$.
\end{lemma}
\begin{proof}
Since we assume $\beta$ is algebraic, if $\beta h(\alpha^\beta)$ is a transcendental number then $h(\alpha^\beta)\in \mathbb T$. In the following, we assume $\beta h(\alpha^\beta)\in \mathbb A\setminus \mathbb{Q}$.
From Theorem~\ref{lma2}, it follows that $h(\alpha^\beta)=\alpha^{\beta h(\alpha^\beta)}$ is transcendental. 
This proves the lemma.
\end{proof}
Assume that $\alpha^{\beta}\in [e^{-e},e^{1/e}]$ with $h(\alpha^\beta)$ being algebraic. Then we have $\alpha^{\beta}=e^{te^{-t} }$, that is,
$\beta=\frac{te^{-t}}{\log \alpha}$
for some $-1\le t\le 1$ as in Theorem~\ref{Theorem-BakerRippon}.
Lemma \ref{53} shows that $h(\alpha^\beta)$ is algebraic if and only if 
\[\beta h(\alpha^\beta)=\frac{t}{\log \alpha}\in\mathbb Q.\]
Therefore, there exists an $a\in\mathbb Q$ such that $t=\log\alpha^a$. One can check easily that $\log\alpha^a$ is transcendental by the Lindemann theorem, so $\log \alpha^a$ is not a root of unity. Thus, $|t|<1$, that is, \[-|\log\alpha|^{-1}< a< |\log\alpha|^{-1}.\]
We record it as a lemma.

\begin{lemma}
\label{hoe}
Let $\alpha\not=1,\beta$ be real algebraic numbers with $\alpha^\beta\in \mathcal R$.
Then the followings hold.
\begin{enumerate}
    \item If $h(\alpha^\beta)\in \mathbb{A}$ then $\beta=\frac{a}{\alpha^a}$, where $a\in\mathbb Q\cap(-|\log\alpha|^{-1},|\log\alpha|^{-1})$.
    \item If there exists $a\in\mathbb Q\cap(-|\log\alpha|^{-1},|\log\alpha|^{-1})$ such that $\beta=\frac{a}{\alpha^a}$, then $h(\alpha^\beta)=\alpha^a$.
\end{enumerate}
\end{lemma}

Lemma \ref{hoe} implies the following theorem.
\begin{theorem}
\label{abt}
Let $\alpha\not=1,\beta$ be real algebraic numbers with $\alpha^\beta\in \mathcal R$.
If only one of ${\rm ord}(\alpha)$ and ${\rm ord}(\beta)$ is infinity then $h(\alpha^\beta)$ is a transcendental number. 
\end{theorem}
\begin{proof}
It suffices to show that when $h(\alpha^\beta)\in \mathbb{A}$, the order of $\alpha$ is infinity if and only if the order of $\beta$ is so. First, we assume ${\rm ord}(\alpha)=k<\infty$ and ${\rm ord}(\beta)=\infty$. If $h(\alpha^\beta)\in \mathbb{A}$ then Lemma \ref{hoe} implies that there exists a rational number $a=\frac{a_1}{a_2}$ such that $\beta=\frac{a}{\alpha^a}$. Since ${\rm ord}(\alpha)=k$, $\beta^{a_2k}=\frac{a^{a_2k}}{\alpha^{a_1k}}$ is a rational number. This contradicts to ${\rm ord}(\beta)=\infty$.

Next we assume ${\rm ord}(\alpha)=\infty$ and ${\rm ord}(\beta)=k<\infty$. As in the above, if $h(\alpha^\beta)\in \mathbb{A}$ then $\beta=\frac{a}{\alpha^a}$, that is, $\alpha=\left(\frac{a}{\beta}\right)^{\frac{1}{a}}$ for some rational number $a=\frac{a_1}{a_2}$. Then we have $\alpha^{a_1k}=\left(\frac{a^k}{\beta^k}\right)^{a_2}$ is rational, but this contradicts to ${\rm ord}(\alpha)=\infty$. This proves the theorem.
\end{proof}

\appendix

\section{Transcendence of $h(1/\sqrt[n]{n})$}
We have not yet mentioned an example of $A\in\mathbb{A}\setminus \mathbb Q$ with ${\rm ord}(A)<\infty$ such that $h(A)$ is transcendental. This appendix gives such an example. 

\begin{proposition} \label{main2}
For every $n\ge 2$, the limit $h(1/\sqrt[n]{n})$ is transcendental.
\end{proposition}

\begin{remark}\label{remark2}
Let $f(x)=x^x$ on $(0,1)$.  From the logarithmic derivative, $f'(x)=x^x(\log x+1)$ holds. Therefore $f(e^{-1})=e^{-1/e}$ is the minimum value of $f$ on $(0,1)$. It follows that $e^{-1/e}\leq f(x)\leq 1$, which implies that $h(f(x))$ is convergent for every $x\in (0,1)$. Hence $h((1/n)^{1/n})$ can be defined for all $n\geq 2$. 
\end{remark}

\begin{proof}[Proof of Proposition~\ref{main2}]
Fix $n\geq 2$. From Lemma~\ref{lma3}, it is sufficient to show that  $h(1/\sqrt[n]{n})$ is not rational. Thus we assume that  $h(1/\sqrt[n]{n})$ is rational. It can be written as $h(1/\sqrt[n]{n})=a/b$ for some relatively prime positive integers $a,b$. From \eqref{h1}, it follows that
\[
	\left(\frac{a}{b}\right)^{\frac{b}{a}}=\left(\frac{1}{n}\right)^{\frac{1}{n}},
\]
which implies that $a^{bn}=1$ and $b^{bn}=n^a$. Thus $a=1$ holds. Since $n\neq1$, we have $b\neq 1$. Therefore it is obtained that
\[
n< 2^n< 2^{2n}\leq b^{bn}=n.
\]
This is a contradiction.
\end{proof}

It is well known that $h(\sqrt{2})=2$. Indeed we see that $\sqrt{2}\in [e^{-e},e^{1/e}]$ from the calculation, and $h(\sqrt{2})^{1/h(\sqrt{2})}=\sqrt{2}$. Here $2^{1/2}=\sqrt{2}$ also holds. Therefore we have $h(\sqrt{2})=2$ from Lemma~\ref{lma4}. On the other hand, $h(1/\sqrt{2})$ is transcendental from Proposition~\ref{main2} with $n=2$.

\section{Acknowledgments}
The authors would like to express their sincere gratitude to the referees for several helpful suggestions which led to the improvement of this paper.
The second author would like to thank Koshi Furuzono and Naru Yamaguchi for discussing and advising.
This work was supported by JSPS KAKENHI Grant Numbers JP19J20878 and JP19J10705.

\begin{thebibliography}{99}
\bibitem{Anderson} J.~Anderson, Iterated exponentials, \textit{Amer. Math. Monthly} {\bf 111} (2004), 668--679.


\bibitem{br}
I.~N.~Baker and P.~J.~Rippon, Convergence of infinite exponentials, \emph{Ann. Acad. Sci. Fenn., Ser. A I, Math.} {\bf 8} (1983), 179--186.

\bibitem{Barrow}
D.~F.~Barrow,
Infinite exponentials, \emph{Amer. Math. Monthly} {\bf 43} (1936), 150--160. 

\bibitem{c07}
A.~Carlsson,
Om itererade funktioner, Ph. D. thesis, Uppsala, 1907.

\bibitem{ga05}
I.~N.~Galidakis, On an application of Lambert's $W$ function to infinite exponentials, \emph{Complex Variables, Theory Appl.} {\bf 49} (2004), 759--780.

\bibitem{Gelfond1}
O.~A.~Gelfond, Sur le septi{\`e}me probl{\`e}me de {D}. {Hilbert},  \emph{C. R. Acad. Sc. URSS} (1934), 1--6. 

\bibitem{Gelfond2}
O.~A.~Gelfond,  Sur le septi\'eme probl\'eme de Hilbert, \emph{Bull. Acad. Sci. URSS, VII. Ser.} (1934), 623--634.

\bibitem{Hurwitz} S.~Hurwitz, On the rational solutions of $m^n=n^m$  with $m \neq n$, \textit{Amer. Math. Monthly} {\bf 74} (1967) 298--300.

\bibitem{MontgomeryVaughan}
H.~L.~Montgomery and R.~C.~Vaughan, {\it Multiplicative Number Theory I. Classical Theory}, Cambridge University Press, 2007.

\bibitem{NicolasRobin}
J.~L.~Nicolas and G.~Robin, Majorations explicites pour le nombre de diviseurs de $N$, \emph{Canad. Math. Bull.}  {\bf 26} (1983), 485--492.

\bibitem{va}A.~van der Poorten, Transcendental entire functions mapping every algebraic number field into itself, \emph{J. Aust. Math. Soc.} {\bf 8} (1968), 192--193. 

\bibitem{Schneider1}
T.~Schneider, Transzendenzuntersuchungen periodischer Funktionen I, \emph{J. Reine Angew. Math.} {\bf 172} (1934), 65--69.

\bibitem{Schneider2}
T.~Schneider, Transzendenzuntersuchungen periodischer Funktionen II, \emph{J. Reine Angew. Math.} {\bf 172} (1934), 70--74.

\bibitem{SondowMarques}
J.~Sondow and D.~Marques,
Algebraic and transcendental solutions of some exponential equations, \emph{Ann. Math. Inform.} {\bf 37} (2010), 151--164.

\end{thebibliography}



\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}:
Primary 11J81; Secondary 11D45, 11J85.

\noindent \emph{Keywords: } iterated exponential, Gelfond-Schneider theorem,
Lindemann theorem, transcendental number.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received December 24 2022;
revised versions received  March 8 2023; March 11 2023; March 12 2023.
Published in {\it Journal of Integer Sequences}, March 13 2023.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

