Perfect Powers With All Equal Digits But One

Omar Kihel Department of Mathematics

Brock University St. Catharines, Ontario L2S 3A1

Canada

okihel@brocku.ca

Florian Luca Instituto de Matemáticas

Universidad Nacional Autónoma de México

C.P. 58089 Morelia, Michoacán

México

fluca@matmor.unam.mx

Abstract

In this paper, among other results, we show that for any fixed integer l ≥ 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 ≥ 3 and 8 · 10^{3n} if l = 3.

1 Introduction

Obláth [6] proved that the only perfect powers all of whose digits are equal to a fixed one a ≠ 1 in decimal representation are 4, 8 and 9. This is equivalent to saying that the diophantine equation

a\frac{x^{n} − 1}{x − 1} = y^{q}, in integers n ≥ 3, x ≥ 2, 1 ≤ a ≤ x, y ≥ 2, q ≥ 2  (1)

has no solution when x = 10 and a ≠ 1. Inkeri [5] extended Obláth’s result by proving that when x ∈ {3, …, 10} and a ≠ 1, equation (1) has the unique solution (a, x, n, y, q) = (4, 7, 4, 40, 2). Thanks to results of Bugeaud and Mignotte [2], we now know that equation (1) has only the following three solutions:

\frac{3^{5} − 1}{3 − 1} = 11^{2}, \frac{7^{4} − 1}{7 − 1} = 20^{2} and \frac{18^{3} − 1}{18 − 1} = 7^{3},

when a = 1 and x ∈ {2, …, 10}. Gica and Panaitopol [4] studied a variant on Obláth’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.

Theorem 1 For a fixed integer l ≥ 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 ≥ 3 and 8 · 10^{3n} for l = 3.

Our main tool for the proof of Theorem 1 is the following result of Corvaja and Zannier from [3].

Theorem 2 Let f(X, Y) = a_{0}(X)Y^{d} + ⋯ + a_{d}(X) be a polynomial in ℚ[X, Y] with d ≥ 2 such that a_{0}(X) ∈ ℚ 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) ∈ ℤ^{3} such that min{m, n, y} → ∞, then there exist h ≥ 1 and p(X) ∈ ℚ[X] nonconstant such that f(X^{h}, p(X)) is nonconstant and has only one term.

We point out that in [3], it was shown that the pair h ≥ 1 and p(X) ∈ ℚ[X] with the property that f(X^{h}, p(X)) has only one term exists only under the hypothesis that min{m, n} → ∞. It was not shown that p(X) is nonconstant. However, a close analysis of the proof of the result from [3] 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} → ∞, then an infinite subfamily of such solutions have the property that y is in the range of the polynomial p(X); thus, if y → ∞, then p(X) cannot be a constant polynomial. Similarly, it is not specifically said in [3] that f(X^{h}, p(X)) is nonconstant but this is also clear from the arguments from [3].

2 Proofs of Theorems 1 and 2

Proof of Theorem 1. Suppose that l ≥ 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 … aba … a}_{(10)},

it follows that we may also rewrite it as

x^{l} = a\frac{10^{n} − 1}{9} + c10^{m},  (2)

where c = b − a. If a = 0, we then get x^{l} = b · 10^{m}, which easily leads to the conclusions that m is a multiple of l, b = 1 if l ≠ 3, and b ∈ {1, 8} if l = 3.

From now on, we assume that a ≠ 0. We also assume that c ≠ 0, otherwise we recover Obláth’s problem. We let

f(X, Y) = \frac{1}{c}Y^{l} − \frac{a}{9c}(X − 1).

Since a ≠ 0, the polynomial f(X, Y) fulfills the hypothesis from Theorem 2. If (m, n, x) is an integer solution of equation (2), then

f(10^{n}, x) = 10^{m}.

Thus, we may take i = j = 10 in the statement of Theorem 2. Assume that we have infinitely many solutions for equation (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 (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} · 10^{n} + (−\frac{a}{9} + c10^{m}) = A · 10^{n} + B,

with A = a/9, and B = −a/9 + c · 10^{m} is a binary recurrent sequence. If B ≠ 0, then it is nondegenerate, therefore it can contain only finitely many perfect l-th powers (see [7]), which is a contradiction. If B = 0, then c · 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.

Since a ≠ 0, min{m, n} = m. Thus, we may assume that min{m, n} → ∞. Clearly, x → ∞ as well. By Theorem 2, it follows that there exist a positive integer h and a nonconstant polynomial p(x) ∈ ℚ[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 ≠ h. Then

r′(X) = cqkX^{k−1} + \frac{a}{9}hX^{h−1}.

Since r(0) = −a/9 ≠ 0, and all roots of r are of multiplicity at least l ≥ 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 ≠ 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 ≠ 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 (2) has only finitely many nontrivial solutions; i.e., solutions different from x^{l} = 10^{ln} if l ≥ 3 and from x^{3} = 8 · 10^{3n} if l = 3.

Bugeaud [1] extended Inkeri’s result from [5] to other values of the basis x. He completely solved equation (1) for x ≤ 100 and also for x = 1000. His result includes that positive integers of the form

\overline{aaaa … aa}_{(10)},  \overline{abab … ab}_{(10)},  \overline{abcabc … 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 … ab … 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.

Theorem 3 The only squares of the form

\overline{aa … ab … b}_{(10)}

in decimal representation are the trivial infinite families 10^{2i}, 4 · 10^{2i}, 9 · 10^{2i} with i ∈ ℕ together with 16, 25, 36, 49, 64, 81, 144, 225, 441, 1444 and 7744.

Theorem 4 For every fixed integer l ≥ 3, there are only finitely many perfect l-th powers of the form

\overline{aa … ab … b}_{(10)}

when written in decimal representation, except for the trivial infinite families 10^{ln} if l ≥ 3 and 8 · 10^{3n} if l = 3.

Proof of theorem 3. Suppose that 1 ≤ a ≤ 9 and 0 ≤ b ≤ 9 are two integers, not necessarily equal, such that

\overline{aa … ab … b}_{(10)} = y^{2},  (3)

where the number of a’s in equation (3) is n and the number of b’s is m. It is easy to verify as done by Gica and Panaitopol [4] 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 (3) yields

10^{m} · 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 ∈ ℕ and

\overline{aa … a}_{(10)} = Y^{2}.

This last equation is Obláth’s problem for squares which is known to have only the solutions a = 1, a = 4, a = 9 and n = 1.

We suppose now that m ≤ 3. Equation (3) can be solved using congruences for few values of a and b but not for all values 1 ≤ a ≤ 9 and 0 ≤ b ≤ 9. So, we proceed as follows.

• If m = 3, then equation (3) yields

10^{3}aa … a + 111b = y^{2}.

Hence,

10^{n+3}a − 10^{3}a + 999b = (3y)^{2}.  (4)

If n ≡ 0 (mod 3); i.e., if n = 3N for a some integer N, then equation (4) yields

Y^{2} = X^{3} − 10^{3}a^{3} + 999a^{2}b,  (5)

where Y = 3ay and X = 10^{N+1}a.

If n ≡ 1 (mod 3); i.e., if n = 3N + 1 for some integer N, then equation (4) yields

Y^{2} = X^{3} − 10^{5}a^{3} + 99900a^{2}b,  (6)

where Y = 30ay and X = 10^{N+2}a.

If n ≡ 2 (mod 3); i.e., if n = 3N + 2 for some integer N, then equation (4) yields

Y^{2} = X^{3} − 10^{7}a^{3} + 9990000a^{2}b,  (7)

where Y = 300ay and X = 10^{N+3}a.

For fixed values of a and b, equations (5), (6) and (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 (1) is x = 1444.

• If m = 2, then equation (3) yields to

10^{n+2}a − 10^{2}a + 99b = (3y)^{2}.  (8)

The same technique used above reduces equation (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 (3) are x = 144 and x = 7744.

• 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 [4]. These solutions are then 16, 25, 36, 49, 81, 225 and 441.

Proof of Theorem 4. Suppose that l ≥ 3 is a fixed integer and that 1 ≤ a ≤ 9 and 0 ≤ b ≤ 9 are two integers such that

\overline{aa … ab … 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

x^{l} = a10^{m} \frac{10^{n} − 1}{9} + b\frac{10^{m} − 1}{9}.  (9)

Hence,

x^{l} = \frac{a}{9}10^{N} + \frac{c}{9}10^{m} − \frac{b}{9},  (10)

where N = n + m and c = b − a. We suppose that c ≠ 0, otherwise we recover Obláth’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} · 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 ≠ 3, and a ∈ {1, 8} if l = 3. We now assume that b ≠ 0. The polynomial f fulfills the hypothesis of Theorem 2. If (m, N, x) is a solution of equation (10), then

f(10^{N}, x) = 10^{m}.

Thus, we may take i = j = 10 in the statement of Theorem 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 (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} · 10^{N} + (−\frac{b}{9} + \frac{c}{9}10^{m}) = A · 10^{N} + B,

where A = a/9 and B = −b/9 + (c/9)10^{m} is a binary recurrent sequence. If B ≠ 0, then it is nondegenerate, therefore it can contain finitely many perfect powers (see again [7]), which is a contradiction. If B = 0, then c · 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} → ∞. It is also clear that x → ∞. By Theorem 2, it follows that there exist a positive integer h and a nonconstant polynomial p(x) ∈ ℚ[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 ≠ h. Then

r′(X) = \frac{cqk}{9} X^{k−1} + \frac{ah}{9}X^{h−1}.

Since r(0) = −b/9 ≠ 0, and all roots of r are of multiplicity at least l ≥ 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 ≠ 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 ≠ 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 (10) has only finitely many nontrivial solutions; i.e., solutions different from x^{l} = 10^{ln} if l ≥ 3 and from x^{3} = 8 · 10^{3n} if l = 3. Remark. The proofs of Theorem 1 and Theorem 4 can easily be generalized to other basis.

3 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.

References

[1] Y. Bugeaud, On the Diophantine equation a(x^{n} − 1)/(x − 1) = y^{q}, in 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.

[2] Y. Bugeaud and M. Mignotte, On integers with identical digits, Mathematika, 46 (1999), 411–417.

[3] P. Corvaja and U. Zannier, On the diophantine equation f(a^{m}, y) = b^{n}, Acta Arith. 94 (2000), 25–40.

[4] A. Gica and L. Panaitopol, On Obláth’s problem, J. Integer Seq. 6 (2003), Paper 03.3.5.

[5] K. Inkeri, On the Diophantine equation a(x^{n} − 1)/(x − 1) = y^{m}, Acta Arith. 21 (1972), 299–311.

[6] R. Obláth, Une proprieté des puissances parfaites, Mathesis 65 (1956), 356–364.

[7] T.N. Shorey and R. Tijdeman, Exponential Diophantine Equations, Cambridge University Press, 1986.

2000 Mathematics Subject Classification: Primary 11D75; Secondary 11J75. Keywords: perfect powers, digits.

Received October 3 2005; revised version received November 9 2005. Published in Journal of Integer Sequences, November 14 2005.

Return to Journal of Integer Sequences home page.