
\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\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,amsmath,amssymb}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{8.9in}

\newcommand{\seqnum}[1]{\href{http://www.research.att.com/cgi-bin/access.cgi/as/~njas/sequences/eisA.cgi?Anum=#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

%\newtheorem{theorem}{Theorem}[section]
%\newtheorem{proposition}{Proposition}[section]
%\newtheorem{corollary}{Corollary}[section]
%\newtheorem{lemma}{Lemma}[section] 


\def\NN{{\mathbb N}}
\def\ZZ{{\mathbb Z}}
\def\QQ{{\mathbb Q}}


\begin{center}
\vskip 1cm{\LARGE\bf {Perfect Powers With All Equal Digits But
One}}
\vskip 1cm
\large
Omar~ Kihel \\
Department of Mathematics \\
Brock University  \\
St. Catharines, Ontario L2S 3A1 \\
Canada \\
\href{mailto:okihel@brocku.ca}{\tt okihel@brocku.ca} \\
\ \\
Florian~Luca\\
Instituto de Matem{\'a}ticas\\
Universidad Nacional Aut\'onoma de M{\'e}xico\\
C.P.~58089 \\
Morelia, Michoac{\'a}n \\
M{\'e}xico\\
\href{mailto:fluca@matmor.unam.mx}{\tt fluca@matmor.unam.mx}\\
\end{center}

\vskip .2 in

\begin{abstract}
In this paper, among other results, we show that for any fixed
integer $l \geq 3$, there are only finitely many perfect $l$-th
powers all of whose digits are equal but one, except for the
trivial families $10^{ln}$ when $l \ge 3$ and $8\cdot 10^{3n}$ if
$l = 3$.
\end{abstract}

\vskip .2in

\renewcommand{\theequation}{\arabic{equation}}

\renewcommand{\theequation}{\arabic{equation}}

\newtheorem{prop}{Proposition}
\newtheorem{lemma}[prop]{Lemma}
\newtheorem{cor}{Corollary}
\newtheorem{corollary}[cor]{Corollary}
\newtheorem{conj}[prop]{Conjecture}
\newtheorem{defi}[prop]{Definition}
\newtheorem{theorem}[prop]{Theorem}
\newtheorem{fac}[prop]{Fact}
\newtheorem{facs}[prop]{Facts}
\newtheorem{com}[prop]{Comments}
\newtheorem{prob}{Problem}
\newtheorem{problem}[prob]{Problem}
\newtheorem{ques}{Question}
\newtheorem{question}[ques]{Question}
\newtheorem{remark}[prop]{Remark}

\section{Introduction}

Obl\'ath \cite{Ob} proved that the only perfect powers all of
whose digits are equal to a fixed one $ a \neq 1$ in decimal
representation are 4, 8 and 9. This is equivalent to saying that
the diophantine equation
\begin{equation}
\label{eq:(1)} a\frac{x^{n}-1}{x - 1} = y^{q}, \; \mbox{in
integers}\;~ n\geq 3,~ x \geq 2,~ 1 \leq a \leq x,~y \geq 2,~ q
\geq 2
\end{equation}
has no solution when $x = 10$ and $a \neq 1$. Inkeri \cite{In}
extended Obl\'ath's result by proving that when $x \in \{3,
\ldots, 10 \}$ and $a \neq 1$, equation (\ref{eq:(1)}) has the
unique solution $(a,x,n,y,q) = (4, 7, 4, 40, 2)$. Thanks to
results of Bugeaud and Mignotte  \cite{BM}, we now know that
equation (\ref{eq:(1)}) has only the following three solutions:
$$
\frac{3^5 - 1}{3 - 1} = 11^2, \;~ \frac{7^4 - 1}{7 - 1} = 20^2\;~
\mbox{and} \;~ \frac{18^3 - 1}{18 - 1} = 7^3,
$$
when $a = 1$ and $x \in \{2, \ldots, 10\}$. Gica and Panaitopol
\cite{GP} studied a variant on Obl\'ath's problem. Namely, they
found all squares of $k$ decimal digits having
$k-1$ of their digits equal to each other. They asked to solve the
analogous problem for higher powers. In the first part of this
paper, we prove the following result.

\begin{theorem}
\label{thm:1} For a fixed integer $l \geq 3$, there are only
finitely many perfect $l$-th powers all whose digits are equal but
one, except for the trivial families $10^{ln}$ for $l\ge 3$ and
$8\cdot 10^{3n}$ for $l = 3$.
\end{theorem}


Our main tool for the proof of Theorem \ref{thm:1} is the
following result of Corvaja and Zannier from \cite{CZ}.

\begin{theorem}
\label{thm:2} Let $f(X,Y)=a_0(X)Y^d+\cdots+a_d(X)$ be a polynomial
in $\QQ[X,Y]$ with $d\geq 2$ such that $a_0(X)\in \QQ$ and the
polynomial $f(0,Y)$ has no multiple root. Let $i, j$ be integers
$>1$ which are not relatively prime. If the equation
$f(i^n,y)=j^m$ has an infinite sequence of solutions $(m,n,y)\in
\ZZ^3$ such that $\min\{m,n,y\}\to\infty$, then there exist $h\ge
1$ and $p(X)\in\QQ[X]$ nonconstant such that $f(X^h,p(X))$ is
nonconstant and has only one term.
\end{theorem}

We point out that in \cite{CZ}, it was shown that the pair $h\ge
1$ and $p(X)\in \QQ[X]$ with the property that $f(X^h,p(X))$ has
only one term exists only under the hypothesis that
$\min\{m,n\}\to\infty$. It was not shown that $p(X)$ is
nonconstant. However, a close analysis of the proof of the result
from \cite{CZ} shows that if $(m,n,y)$ is any infinite family of
integer solutions to the equation $f(i^n,y)=j^m$ with
$\min\{m,n\}\rightarrow\infty$, then an infinite subfamily of such
solutions have the property that $y$ is in the range of the
polynomial $p(X)$; thus, if $y\to\infty$, then $p(X)$ cannot be a
constant polynomial. Similarly, it is not specifically said in
\cite{CZ} that $f(X^h,p(X))$ is nonconstant but this is also clear
from the arguments from \cite{CZ}.

\section{Proofs of Theorems 1 and 2}

{\sc Proof of Theorem 1.} Suppose that $l \geq 3$ is a fixed
integer. Consider a perfect $l$-th power with all identical digits
but one of them. Writing it first as
$$
x^l={\overline{a\dots aba\dots a}}_{(10)},
$$
it follows that we may also rewrite it as
\begin{equation}
\label{eq:(2)} x^l=a\frac{10^{n}-1}{9}+c10^m,
\end{equation}
where $c=b-a$. If $a=0$, we then get $x^l=b\cdot 10^m$, which
easily leads to the conclusions that $m$ is a multiple of $l$,
$b=1$ if $l \neq 3$, and $b\in \{1,8\}$ if $l = 3$.

\medskip

{From} now on, we assume that $a\ne 0$. We also assume that $c\ne
0$, otherwise we recover Obl\'ath's problem. We let
$$
f(X,Y)=\frac{1}{c}Y^l-\frac{a}{9c}(X-1).
$$
Since $a\ne 0$, the polynomial $f(X,Y)$ fulfills the hypothesis
from Theorem \ref{thm:2}. If $(m,n,x)$ is an integer solution of
equation (\ref{eq:(2)}), then
$$
f(10^n,x)=10^m.
$$
Thus, we may take $i = j = 10$ in the statement of Theorem
\ref{thm:2}. Assume that we have infinitely many solutions for
equation (\ref{eq:(2)}). Since the pair $(a,c)$ can assume only
finitely many values, it follows that we may assume that $(a,c)$
is fixed in equation (\ref{eq:(2)}). If $m$, remains bounded over
an infinity of solutions, it follows that we may assume that it is
fixed. But then, the sequence
$$
u_n=\frac{a}{9}\cdot 10^n+\left(-\frac{a}{9}+c10^m\right)=A\cdot
10^n+B,
$$
with $A=a/9$, and $B=-a/9+c\cdot 10^m$ is a binary recurrent
sequence. If $B\ne 0$, then it is nondegenerate, therefore it can
contain only finitely many perfect $l$-th powers (see \cite{ST}),
which is a contradiction. If $B=0$, then $c\cdot 10^m=a/9$. Since
$c$ is an integer and $a$ is a digit, we get that $a=9,~c=1,~m=0$, therefore 
$b=a+c=10$, which is a contradiction. 

\medskip

Since $a \neq 0$, $\min\{m,n\} = m$. Thus, we may assume that
$\min\{m,n\}\rightarrow\infty$. Clearly, $x\rightarrow\infty$ as
well. By Theorem \ref{thm:2}, it follows that there exist a
positive integer $h$ and a nonconstant polynomial $p(x)\in \QQ[X]$
such that $f(X^h,p(X))$ has only one term. Write
$f(X^h,p(X))=qX^k$ for some nonzero rational $q$ and positive
integer $k$. This leads to
$$
p(X)^l=cqX^k+\frac{a}{9}(X^h-1):=r(X).
$$
Assume $k\ne h$. Then
$$
r'(X)=cqkX^{k-1}+\frac{a}{9}hX^{h-1}.
$$
Since $r(0)=-a/9\ne 0$, and all roots of $r$ are of multiplicity
at least $l \geq 3$, it follows that all roots of $r$ are also
among the nonzero roots of $r'(X)$. If $k>h$, then these are the
roots of $r_1(x)=cqkX^{k-h}+ah/9$, while if $h>k$, then these are
the roots of $r_2(X)=ah/9X^{h-k}+cqk$. In both cases, the roots of
$r(X)$ are multiple roots of $r_1(X)$ (or $r_2(X)$, respectively).
However, since $ahcqk\ne 0$, neither the polynomial $r_1(X)$ nor
the polynomial $r_2(X)$ has multiple roots. Thus, we get $k=h$,
and
$$
p(X)^l=(cq+a/9)X^h-a/9.
$$
Since $a \neq 0$, the above relation is impossible (again, the
polynomial on the right is nonconstant since $p(X)$ is nonconstant
and does not admit multiple roots). This shows that indeed
equation (\ref{eq:(2)}) has only finitely many nontrivial
solutions; i.e., solutions different from $x^l=10^{ln}$ if $l\ge
3$ and from $x^3=8\cdot 10^{3n}$ if $l = 3$.


\medskip

Bugeaud \cite{Bu} extended Inkeri's result from \cite{In} to other
values of the basis $x$. He completely solved equation
(\ref{eq:(1)}) for $x \leq 100$ and also for $x = 1000$. His
result includes that positive integers of the form
$$
{\overline{aaaa \ldots aa}}_{(10)},\qquad {\overline{abab \ldots
ab}}_{(10)},\qquad {\overline{abcabc \ldots abc}}_{(10)}
$$
cannot be perfect powers except for the integers $a$, $ab$ and
$abc$, when these integers themselves are perfect powers. Here, we
will consider the problem of which perfect powers have the form
$$
{\overline{aa \ldots ab \ldots b}}_{(10)}
$$
when written in decimal representation, where the number of $a$'s
and the number of $b$'s are not necessarily equal. We prove the
following theorems.

\begin{theorem}
\label{thm:3} The only squares of the form
$${\overline{aa \ldots ab \ldots b}}_{(10)}$$ in decimal
representation are the trivial infinite families $10^{2i},\;
4\cdot 10^{2i}$, $9\cdot 10^{2i}$ with $i \in \NN$ together with
16, 25, 36, 49, 64, 81, 144, 225, 441, 1444 and 7744.
\end{theorem}

\begin{theorem}
\label{thm:4} For every fixed integer $l \geq 3$, there are only
finitely many perfect $l$-th powers of the form
$$
{\overline{aa \ldots ab \ldots b}}_{(10)}
$$
when written in decimal representation, except for the trivial
infinite families $10^{ln}$ if $ l \ge 3$ and $8\cdot 10^{3n}$ if
$l = 3$.
\end{theorem}

{\sc Proof of theorem 3.} Suppose that $ 1 \leq a \leq 9$ and
$0\leq b \leq 9$ are two integers, not necessarily equal, such
that
\begin{equation}
\label{eq:(3)} {\overline{aa \ldots ab \ldots b}}_{(10)} = y^2,
\end{equation}
where the number of $a$'s in equation (\ref{eq:(3)}) is $n$ and
the number of $b$'s is $m$. It is easy to verify as done by Gica
and Panaitopol \cite{GP} that the last 4 digits of a square are
equal only when they are equal to $0$. Thus, if $ m > 3$, then the
integer $b$ is equal $0$. Hence, equation (\ref{eq:(3)}) yields
$$
10^{m} \cdot a \frac{10^{n} - 1}{9} = y^2 ,
$$
which easily leads to the conclusion that $m$ is an even number;
i.e., $m = 2i$ for a certain integer $i \in \NN$ and
$$
{\overline{aa \ldots a}}_{(10)} = Y^2 .
$$
This last equation is Obl\'ath's problem for squares which is
known to have only the solutions $a =1$, $a=4$, $a = 9$ and $n =
1$.

\medskip

We suppose now that $m \leq 3 $. Equation (\ref{eq:(3)}) can be
solved using congruences for few values of $a$ and $b$ but not for
all values $ 1 \leq a \leq 9$ and $0\leq b \leq 9$. So, we proceed
as follows.

\medskip

\noindent $\bullet$ If $m = 3$, then equation (\ref{eq:(3)})
yields
$$
10^3 aa \ldots a + 111b = y^2.
$$
Hence,
\begin{equation}
\label{eq:(4)} 10^{n+3} a - 10^3 a + 999b = (3y)^2.
\end{equation}
If $n\equiv 0\pmod 3$; i.e., if $n = 3N$ for a some integer $N$,
then equation (\ref{eq:(4)}) yields
\begin{equation}
\label{eq:(5)} Y^2 = X^3 - 10^3 a^3 + 999 a^2 b,
\end{equation}
where $Y = 3ay$ and $X = 10^{N+1}a.$

\medskip

If $n \equiv 1\pmod 3$; i.e., if $n = 3N + 1$ for some integer
$N$, then equation (\ref{eq:(4)}) yields
\begin{equation}
\label{eq:(6)} Y^2 = X^3 - 10^5 a^3 + 99900 a^2 b,
\end{equation}
where $Y = 30ay$ and $X = 10^{N+2}a.$

\medskip

If $n \equiv 2\pmod 3$; i.e., if $n = 3N + 2$ for some integer
$N$, then equation (\ref{eq:(4)}) yields
\begin{equation}
\label{eq:(7)} Y^2 = X^3 - 10^7 a^3 + 9990000 a^2 b,
\end{equation}
where $Y = 300ay$ and $X = 10^{N+3}a.$

\medskip

\noindent For fixed values of $a$ and $b$, equations
(\ref{eq:(5)}), (\ref{eq:(6)}) and (\ref{eq:(7)}) represent
elliptic curves. We used SIMATH to find all integral points on
these elliptic curves. The only solution that we found which
corresponds to an integer solution to equation (\ref{eq:(1)}) is
$x=1444.$

\medskip

\noindent $\bullet$ If $m = 2$, then equation (\ref{eq:(3)})
yields to
\begin{equation}
\label{eq:(8)} 10^{n + 2}a - 10^2 a + 99b = (3y)^2.
\end{equation}
The same technique used above reduces equation (\ref{eq:(8)}) to
finding integral points on a family of elliptic curves. We used
SIMATH and found that the integer solutions that correspond to
solutions to equation (\ref{eq:(3)}) are $x=144$ and $x=7744.$

\medskip

\noindent $\bullet$ If $m = 1$, then we can use the same technique
as above but this is already a particular case of Gica and
Panaitopol's results from \cite{GP}. These solutions are then
$16,~ 25,~ 36,~ 49,~ 81,~ 225$ and $441.$


\medskip

\noindent {\sc Proof of Theorem 4.} Suppose that $l \geq 3$ is a
fixed integer and that $1 \leq a \leq 9$ and $0 \leq b \leq 9$ are
two integers such that
$$
{\overline{aa \ldots ab \ldots b}}_{(10)} = x^{l} ,
$$
where the number of $a$'s is $n$ and the number of $b$'s is $m$.
It follows that we may write rewrite this equation as
\begin{equation}
\label{eq:(9)} x^l = a 10^{m} \frac{10^{n} - 1}{9} + b
\frac{10^{m} - 1}{9}.
\end{equation}
Hence,
\begin{equation}
\label{eq:(10)} x^l = \frac{a}{9}10^{N} + \frac{c}{9} 10^{m} -
\frac{b}{9},
\end{equation}
where $N = n + m$ and $c=b-a$. We suppose that $c \neq 0$,
otherwise we recover Obl\'ath's problem. We let
$$
f(X,Y) = \frac{9}{c} Y^l - \frac{a}{c} X + \frac{b}{c}.
$$
If $b = 0$, we then get
$$10^{m}\cdot a \frac{10^{n} -1}{9} = x^l,
$$ which leads to the conclusion that $m$ is a multiple of $l$,
$n = 1$, $a = 1$ if $l \neq 3$, and $a \in \{1,8\}$ if $l = 3$. We
now assume that $b \neq 0$. The polynomial $f$ fulfills the
hypothesis of Theorem \ref{thm:2}. If $(m,N,x)$ is a solution of
equation (\ref{eq:(10)}), then
$$
f(10^{N},x) = 10^{m}.
$$
Thus, we may take $i = j = 10$ in the statement of Theorem
\ref{thm:2}. Since the pair $(a, b)$ can assume only finitely many
values, it follows that we may assume that the $(a, b)$ is fixed
in equation (\ref{eq:(10)}). If $m$ remains bounded over an
infinity of solutions, it then follows that we may assume that it
is fixed. But then, the sequence
$$
u_N=\frac{a}{9}\cdot
10^N+\left(-\frac{b}{9}+\frac{c}{9}10^m\right)=A\cdot 10^N+B,
$$
where $A=a/9$ and $B = -{b}/{9}+({c}/{9})10^m$ is a binary
recurrent sequence. If $B\ne 0$, then it is nondegenerate,
therefore it can contain finitely many perfect powers (see again
\cite{ST}), which is a contradiction. If $B=0$, then $c\cdot
10^m=a/9$. Since $c$ is an integer and $a$ is a digit, we get that
$a=9,~c=1,~m=0$, so $b=a+c=10$, 
which is a contradiction. Since $N > m$, $\min\{m, N\} =
m$. So, we may assume that $\min\{m,N\}\rightarrow\infty$. It is
also clear that $x\to\infty$. By Theorem \ref{thm:2}, it follows
that there exist a positive integer $h$ and a nonconstant
polynomial $p(x)\in \QQ[X]$, such that $f(X^h,p(X))$ is
nonconstant and has only one term. Write $f(X^h,p(X))=qX^k$ for
some nonzero rational $q$ and positive integer $k$. This leads to
$$
p(X)^l=\frac{cq}{9}X^k+\frac{a}{9}X^h - \frac{b}{9}:=r(X).
$$
Assume $k\ne h$. Then
$$
r'(X)=\frac{cqk}{9}X^{k-1}+\frac{ah}{9}X^{h-1}.
$$
Since $r(0)=-b/9\ne 0$, and all roots of $r$ are of multiplicity
at least $l \geq 3$, it follows that all roots of $r$ are also
among the nonzero roots of $r'(X)$. If $k>h$, then these are the
roots of $r_1(x)=cqkX^{k-h}+ah$, while if $h>k$, then these are
the roots of $r_2(X)=ahX^{h-k}+cqk$. In both cases, the roots of
$r(X)$ are multiple roots of $r_1(X)$ (or $r_2(X)$, respectively).
However, since $ahcqk\ne 0$, neither the polynomial $r_1(X)$ nor
the polynomial $r_2(X)$ has multiple roots. Thus, we get $k=h$,
and
$$
p(X)^l = \frac{cq + a}{9}X^h - \frac{b}{9}.
$$
Since $b \neq 0$, the above relation is impossible (again, the
polynomial on the right is nonconstant since $P(X)$ is nonconstant
and does not admit multiple roots). This shows that indeed
equation (\ref{eq:(10)}) has only finitely many nontrivial
solutions; i.e., solutions different from $x^l=10^{ln}$ if $ l \ge
3$ and from $x^3=8\cdot 10^{3n}$ if $l = 3$. 

\medskip

\noindent {\bf Remark.} The proofs of Theorem 1 and Theorem 4 can
easily be generalized to other basis.


\section{Acknowledgments}

The first author was supported in part by
a grant from NSERC. Research of F.~L. was supported in part by
grants PAPIIT IN104505, SEP-CONACyT 46755 and a Guggenheim
Fellowship.



\begin{thebibliography}{99}

\bibitem{Bu} Y. Bugeaud, On the Diophantine equation $a(x^n-1)/(x-1)=y^q$,
in {\it Number Theory: Proceedings of the Turku Symposium on
Number Theory in Memory of Kustaa Inkeri, Turku, Finland, May
31-June 4, 1999\/}, Berlin, de Gruyter, 2001, pp.\ 19--24.

\bibitem{BM} Y. Bugeaud and M. Mignotte,
On integers with identical digits, {\it Mathematika,} {\bf 46}
(1999), 411--417.

\bibitem{CZ} P. Corvaja and U. Zannier, On the diophantine equation
$f(a^m,y)=b^n$, {\it Acta Arith.} {\bf 94} (2000), 25--40.

\bibitem{GP} A. Gica and L. Panaitopol, 
\href{http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Panaitopol/panaitopol41.html}{On Obl\'ath's problem}, {\it 
J. Integer Seq.\/} {\bf 6} (2003), Paper 03.3.5.

\bibitem{In} K. Inkeri, On the Diophantine equation $a(x^n-1)/(x-1)=y^m$,
{\it Acta Arith.} {\bf 21} (1972), 299--311.

\bibitem{Ob} R. Obl\'ath, Une propriet\'e des puissances parfaites,
{\it Mathesis} {\bf 65} (1956), 356--364.

\bibitem{ST} T.N. Shorey and R. Tijdeman, {\it Exponential Diophantine
Equations}, Cambridge University Press, 1986.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2000 {\it Mathematics Subject Classification}:
Primary 11D75; Secondary 11J75.

\noindent \emph{Keywords: } perfect powers, digits.


\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received October 3 2005;
revised version received November 9 2005.  
Published in {\it Journal of Integer Sequences}, November 14 2005.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

\end{document}
