Square Curious Numbers

Neelima Borade and Jacob Mayle University of Illinois at Chicago

Department of Mathematics, Statistics and Computer Science Chicago, IL 60302-7045 USA

                    nborad2@uic.edu
                    jmayle2@uic.edu

Abstract

A curious number is a palindromic number whose base-ten representation has the form a ⋯ ab ⋯ ba ⋯ a. In this paper, we determine all curious numbers that are perfect squares. Our proof involves reducing the search for such numbers to several single variable families. From here, we complete the proof in two different ways. The first approach is elementary, though somewhat ad hoc. The second entails studying integral points on elliptic curves and is more systematic. Following these proofs, we consider curious numbers with respect to other bases. We use the elliptic curve technique to determine all perfect squares among the curious numbers in bases 2, 4, 6, and 12.

1 Introduction

Ian Stewart begins his popular recreational mathematics book Professor Stewart’s Hoard of Mathematical Treasures [15] with the following “calculator curiosity”:

(8 × 8) + 13 = 77
(8 × 88) + 13 = 717
(8 × 888) + 13 = 7117
(8 × 8888) + 13 = 71117
(8 × 88888) + 13 = 711117
(8 × 888888) + 13 = 7111117
(8 × 8888888) + 13 = 71111117
(8 × 88888888) + 13 = 711111117.

The numbers on the right of the equations above are examples of what we call curious numbers.

Definition 1. Let m, n be integers with m ≥ 0 and n ≥ 1. An integer is an (m, n)-curious number if its base-ten representation is

\underbrace{a ⋯ a}_{m} \underbrace{b ⋯ b}_{n} \underbrace{a ⋯ a}_{m}

for some integers a, b satisfying 1 ≤ a ≤ 9 and 0 ≤ b ≤ 9. By convention, when m = 0,

\underbrace{a ⋯ a}_{0} \underbrace{b ⋯ b}_{n} \underbrace{a ⋯ a}_{0} := \underbrace{b ⋯ b}_{n} .

A nonnegative integer is called a curious number if it is an (m, n)-curious number for some integers m, n with m ≥ 0 and n ≥ 1.

The sequence of curious numbers, listed as \underline{A335779} in the On-Line Encyclopedia of Integer Sequences (OEIS) [14], begins with

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, ….

The sequence of palindromes, listed as \underline{A002113}, contains the sequence of curious numbers as a subsequence. The smallest palindrome that is not a curious number is 10101. On the other hand, the sequence of curious numbers contains the sequence of repdigits, listed as \underline{A010785}, as a subsequence. The smallest curious number that is not a repdigit is 101.

Looking at the curious numbers in Stewart’s “calculator curiosity”, we notice that none are perfect squares. This follows from the observations that each number in the family 71 ⋯ 17 is congruent to 2 modulo 5 and that 2 is a quadratic non-residue modulo 5.

The question of which repdigits (i.e., (0, n)-curious numbers) are perfect squares is a pleasant exercise in elementary number theory. There are 28 repdigits of length at most three. Among those, only 0, 1, 4, and 9 are perfect squares. No repdigit of length at least four is a perfect square since one may verify that each of

1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, and 9999

is a quadratic non-residue modulo 10000. Thus the only repdigits that are perfect squares are 0, 1, 4, and 9.

The general question of which repdigits are perfect powers is known as Obláth’s problem. After Obláth’s [11] partial solution, the problem was fully solved by Bugeaud and Mignotte [4] using bounds on p-adic logarithms. Variations on Obláth’s problem have been studied by several authors. For instance, Gica and Panaitopol [6] determined all perfect squares among the near repdigits, which are integers for which all but a single digit are equal. Recently, Goddard and Rouse [7] determined the perfect squares that may be written as the sum of two repdigits. Whereas other authors relied on techniques related to Pell equations to settle difficult cases, Goddard and Rouse used a powerful technique involving elliptic curves.

The objective of this paper is to determine all curious numbers that are perfect squares (i.e., curious squares). Specifically, we prove the following result, which is our main theorem.

Theorem 2. The curious numbers that are perfect squares are precisely the following:

0, 1, 4, 9, 121, 484, 676, and 44944.

Broadly speaking, our proof of Theorem 2 runs as follows. First, in §2, we recast the problem in algebraic terms. Next, in §3, we reduce modulo 10^{7} to narrow down our search for curious squares to thirteen single variable families. From here, we complete the proof in two distinct ways. The first approach, given in §4, proceeds by studying the families via modular arithmetic. This approach is somewhat ad hoc, whereas our second method, given in §5, is more systematic. Here we study the families via integral points on elliptic curves, along the lines of Goddard and Rouse [7, §4].

Related to Obláth’s problem is the problem of Nagell-Ljunggren [8, 9, 10]. Here the objective is to find all triples (B, n, q) such that the length-n base-B repunit 1 ⋯ 1_{B} is a perfect qth power. This problem and variants of it have been studied extensively [1, 2, 5]. It serves as motivation for us to consider our main problem in other bases and for higher powers. In §6, we solve our problem for certain other bases that are amenable to the elliptic curve technique. In §7, we comment on some of the difficulties that arise in considering cubic and higher powers.

2 Algebraic reformulation

In this section, we recast our problem in algebraic terms. To do so, we start by developing an algebraic expression for curious numbers. We recall the following standard expression for repdigits,

a_{m} := \underbrace{a ⋯ a}_{m} = a · \frac{10^{m} − 1}{10 − 1}.  (1)

Now observe that

a_{m}b_{n}a_{m} := \underbrace{a ⋯ a}_{m} \underbrace{b ⋯ b}_{n} \underbrace{a ⋯ a}_{m} = 10^{m+n} · a_{m} + 10^{m} · b_{n} + a_{m}.  (2)

Note that in the shorthand a_{m}b_{n}a_{m}, juxtaposition denotes concatenation rather than multiplication.

Upon combining equations (1) and (2), we obtain an expression for curious numbers,

a_{m}b_{n}a_{m} = a · 10^{m+n} · \frac{10^{m} − 1}{10 − 1} + b · 10^{m} · \frac{10^{n} − 1}{10 − 1} + a · \frac{10^{m} − 1}{10 − 1}.  (3)

To streamline matters, we define the integers

M_{a,b,m} := 10^{m} · (a − b) − a and N_{a,b,m} := 10^{m} · (a · 10^{m} + b − a).  (4)

After some regrouping, (3) becomes

a_{m}b_{n}a_{m} = \frac{1}{9} (N_{a,b,m} · 10^{n} + M_{a,b,m}).  (5)

We are interested in determining the collection of a_{m}b_{n}a_{m} that are perfect squares. Thus, by multiplying (5) through by 9, we record that our problem reduces to solving the equation

(3y)^{2} = N_{a,b,m} · 10^{n} + M_{a,b,m}  (6)

in the nonnegative integers a, b, m, n, y with the restrictions that n ≥ 1, 1 ≤ a ≤ 9, and 0 ≤ b ≤ 9.

3 Narrowing search to several single variable families

Let C_{m,n} denote the set of (m, n)-curious numbers and write C = ⋃_{m≥0,n≥1} C_{m,n} for the set of all curious numbers. Let S denote the set of all perfect squares. For each positive integer k, define the set

S_{k} := {s^{2} ∈ S : s ≤ k}.

Finally, we denote the reduction modulo 10^{7} map by

π : ℤ ⟶ ℤ/10^{7}ℤ.

In the notation above, our ultimate objective is to determine the intersection C ∩ S. We start by computing the intersection π(C) ∩ π(S). Here, our choice to reduce modulo 10^{7} is somewhat arbitrary. In fact, what follows works provided that we reduce modulo 10^{k} for any k ≥ 4. However, we choose k = 7 because this is the smallest exponent for which the number of families that we will need to consider in the next section is minimal.

Observe that π(C) and π(S) may be realized as

π(C) = ⋃_{\begin{matrix}(m,n) \\ 0≤m≤7 \\ 1≤n≤7−m \end{matrix}} π(C_{m,n}) and π(S) = π(S_{10^{7}}).

As the sets C_{m,n} and S_{10^{7}} are finite and of reasonable size, it is straightforward to determine π(C) and π(S) with a computer. We do so using SageMath [12], and find their intersection

π(C) ∩ π(S) = { 0, 1, 4, 9, 121, 161, 484, 656, 676, 929, 969, 1001, 1441, 1881, ; 4004, 4224, 5225, 6116, 6336, 9009, 9449, 9889, 10001, 14441, 18881, ; 40004, 44544, 44644, 44944, 52225, 67776, 90009, 94449, 98889, ; 100001, 144441, 188881, 400004, 442244, 447744, 522225, 655556, ; 677776, 900009, 944449, 988889, 1000001, 1444441, 1888881, 2222224, ; 2222225, 2222244, 3333444, 4000004, 4222224, 4222244, 4333444, ; 4422244, 4433344, 4433444, 4441444, 4444441, 4444449, 4445444, ; 4449444, 4477444, 4777444, 4777744, 5222225, 5555556, 6555556, ; 7777444, 8888881, 8888889, 9000009, 9444449, 9888889 }.

We have that π(C ∩ S) ⊆ π(C) ∩ π(S). Those elements of π(C) ∩ π(S) whose preimage under the map C ⟶^{π} ℤ/10^{7}ℤ consists of a single non-square integer are not members of π(C ∩ S). For instance, the preimage of 4333444 under C ⟶^{π} ℤ/10^{7}ℤ is the singleton {444333444}. Since 444333444 is not a perfect square, we ascertain that 4333444 ∉ π(C ∩S). Proceeding in this way, we find that

π(C ∩ S) ⊆ {\{0, 1, 4, 9, 121, 484, 676, 44944, 2222224, 2222225, 2222244, 3333444, \atop 4444441, 4444449, 5555556, 7777444, 8888881, 8888889 \}.}

Taking the preimage of the above set inclusion under C ⟶^{π} ℤ/10^{7}ℤ, we deduce that

C ∩ S ⊆ {0, 1, 4, 9, 121, 484, 676, 44944, 10 ⋯ 01, 14 ⋯ 41, 18 ⋯ 81, 40 ⋯ 04, ; 42 ⋯ 24, 442 ⋯ 244, 4443 ⋯ 3444, 4447 ⋯ 7444, 52 ⋯ 25, 65 ⋯ 56, ; 90 ⋯ 09, 94 ⋯ 49, 98 ⋯ 89 }. (7)

The elements above that are listed with an ellipsis are placeholders for the appropriately corresponding single variable family of curious numbers. For instance, we write 4443 ⋯ 3444 to denote the family

4443 ⋯ 3444 := \{444 \underbrace{3 ⋯ 3}_{n} 444 : n ≥ 1\}.

The assertion of Theorem 2 is that C ∩ S = {0, 1, 4, 9, 121, 484, 676, 44944}. Thus, by (7), it suffices to prove that there does not exist a perfect square in any of the thirteen single variable families in the set F below

F := {\{10 ⋯ 01, 14 ⋯ 41, 18 ⋯ 81, 40 ⋯ 04, 42 ⋯ 24, 442 ⋯ 244, 4443 ⋯ 3444, \atop 4447 ⋯ 7444, 52 ⋯ 25, 65 ⋯ 56, 90 ⋯ 09, 94 ⋯ 49, 98 ⋯ 89\}.}

4 Considering families via modular arithmetic

In this section, we use modular arithmetic considerations to prove that none of the families in F contain a square. Let us begin by considering 10 ⋯ 01. Observe that each number in this family is congruent to 2 modulo 3. As 2 is a quadratic non-residue modulo 3, it follows at once that no number in this family is a square. In fact, since each of the numbers in 40 ⋯ 04 and 90 ⋯ 09 is a square multiple of a number in 10 ⋯ 01, neither of these two families contain any squares as well.

Given the above, our problem is reduced to proving that the ten remaining families of F contain no squares. For each of these families, in Table 1 we record the coefficients M_{a,b,m} and N_{a,b,m}, as defined in (4). We rule out the possibility of perfect squares in each of the families in Table 1 via two elementary lemmas.

Lemma 3. If M_{a,b,m} is a quadratic non-residue modulo N_{a,b,m}, then a_{m}b_{n}a_{m} is not a square for each n ≥ 1.

Proof. This follows from (6) upon reducing modulo N_{a,b,m}.

\begin{matrix}Family & a & b & m & M_{a,b,m} & N_{a,b,m} \\ 14 ⋯ 41 & 1 & 4 & 1 & −31 & 130 \\ 18 ⋯ 81 & 1 & 8 & 1 & −71 & 170 \\ 42 ⋯ 24 & 4 & 2 & 1 & 16 & 380 \\ 442 ⋯ 244 & 4 & 2 & 2 & 196 & 39800 \\ 4443 ⋯ 3444 & 4 & 3 & 3 & 996 & 3999000 \\ 4447 ⋯ 7444 & 4 & 7 & 3 & −3004 & 4003000 \\ 52 ⋯ 25 & 5 & 2 & 1 & 25 & 470 \\ 65 ⋯ 56 & 6 & 5 & 1 & 4 & 590 \\ 94 ⋯ 49 & 9 & 4 & 1 & 41 & 850 \\ 98 ⋯ 89 & 9 & 8 & 1 & 1 & 890 \end{matrix}

Table 1: Families of possible solutions.

For instance, let us consider the family 14 ⋯ 41 in view of the above lemma. From Table 1, we read that (a, b, m) = (1, 4, 1), M_{a,b,m} = −31, and N_{a,b,m} = 130. Note that −31 is a quadratic non-residue modulo 130. Thus, we deduce that the family 14 ⋯ 41 contains no perfect squares. Applying Lemma 3 to the data from Table 1 in this way for each of the ten families, we conclude that none of the following five families contain a perfect square:

14 ⋯ 41, 18 ⋯ 81, 4443 ⋯ 3444, 4447 ⋯ 7444, and 94 ⋯ 49.

This leaves the five other families to consider. We do so via our next lemma. For coprime integers M and N, we write ord_{N}(M) to denote the order of M modulo N.

Lemma 4. Let N be a positive integer with gcd(N, 10) = 1. If for each integer k with 0 ≤ k < ord_{N}(10), we have that N_{a,b,m} · 10^{k} + M_{a,b,m} is a quadratic non-residue modulo N, then a_{m}b_{n}a_{m} is not a square for each n ≥ 1.

Proof. We prove the contrapositive. Suppose that n_{0} is such that a_{m}b_{n_{0}}a_{m} is a square. Then a, b, m, n_{0}, and y := \sqrt{a_{m}b_{n_{0}}a_{m}} give a solution to (6). Write k_{0} to denote the integer for which 0 ≤ k_{0} < ord_{N}(10) and k_{0} ≡ n_{0} (mod ord_{N}(10)). Then 10^{n_{0}} ≡ 10^{k_{0}} (mod N), so upon reducing (6) modulo N, we find that

N_{a,b,m} · 10^{k_{0}} + M_{a,b,m} ≡ N_{a,b,m} · 10^{n_{0}} + M_{a,b,m} ≡ (3y)^{2} (mod N).

Hence, N_{a,b,m} · 10^{k_{0}} + M_{a,b,m} is a quadratic residue modulo N.

Using SageMath [12], we search for (and find) appropriate N as in Lemma 4 for each of five remaining families. The relevant data is tabulated in Table 2.

Together with Lemma 4, this data proves that none of the five remaining families contain a perfect square. To highlight an example, let us consider the family 42 ⋯ 24. We read the values 396, 819, and 54 from the fourth column of the first row of data. Because each of these is a quadratic non-residue modulo N = 999, Lemma 4 implies that the family in question contains no perfect squares.

Family  N  ord_{N}(10) N_{a,b,m} · 10^{k} + M_{a,b,m} mod N for 0 ≤ k < ord_{N}(10)
42 ⋯ 24 999 3  396, 819, 54
442 ⋯ 244 77  6  33, 29, 66, 51, 55, 18
52 ⋯ 25 91  6  40, 84, 69, 10, 57, 72
65 ⋯ 56 13837 8  594, 5904, 3656, 8850, 5442, 12873, 4161, 63
98 ⋯ 89 1001 6  891, 893, 913, 112, 110, 90

Table 2: Data for the five remaining families.

5 Considering families via elliptic curves

In this section, we give a systematic method that determines the squares in a given single variable family. As we shall see, the squares are in one-to-one correspondence with the integral points of a specific form on certain elliptic curves. An elliptic curve E (defined over the rationals) is a projective curve with an affine equation

E : y^{2} = x^{3} + ax + b

for some a, b ∈ ℚ with nonzero discriminant Δ := −16(4a^{3} + 27b^{2}). The set of integral points of E is

E(ℤ) := {(x, y) ∈ ℤ × ℤ : y^{2} = x^{3} + ax + b}.

This set is finite and fairly computable. See, for instance, Silverman [13, Chp. IX] for a thorough treatment of integral points on elliptic curves. In what follows, we use the IntegralPoints command in Magma [3] to rigorously compute the integral points of various elliptic curves.

We start with some notation. Let a, b, and m be nonnegative integers with 1 ≤ a ≤ 9, 0 ≤ b ≤ 9. Consider the single variable family

{a_{m}b_{n}a_{m} : n ≥ 1} .

We are interested in determining its squares, i.e., the set

Q_{a,b,m} := {n ≥ 1 : a_{m}b_{n}a_{m} is a perfect square}.

For each j ∈ {0, 1, 2}, we define

B_{a,b,m,j} := N_{a,b,m}^{2} · 10^{2j} · M_{a,b,m}

and consider the elliptic curve

E_{a,b,m,j} : y^{2} = x^{3} + B_{a,b,m,j}.

Indeed, the above equation defines an elliptic curve since

Δ = −16(4 · 0^{3} + 27 · B_{a,b,m,j}^{2}) = −16 · 27 · B_{a,b,m,j}^{2} ≠ 0.

We are interested in the integral points of E_{a,b,m,j} and, more specifically, the subset

L_{a,b,m,j} := E_{a,b,m,j}(ℤ) ∩ {(N_{a,b,m} · 10^{j+k}, N_{a,b,m} · 10^{j} · 3y) ∈ ℤ × ℤ : k, y ≥ 0} .

Proposition 5. In the notation above, we have a bijection

Φ : Q_{a,b,m} ⟶ L_{a,b,m,0} ∪ L_{a,b,m,1} ∪ L_{a,b,m,2}
n = 3k + j ⟼ (N_{a,b,m} · 10^{j+k}, N_{a,b,m} · 10^{j} · 3\sqrt{a_{m}b_{n}a_{m}}),

where we write n = 3k + j for integers j, k with j ∈ {0, 1, 2}. Proof. The map Φ is well-defined. Indeed, the decomposition n = 3k + j with j ∈ {0, 1, 2} is unique and we now verify that the image of Φ is contained in the stated codomain. If n = 3k + j ∈ Q_{a,b,m}, then

(3\sqrt{a_{m}b_{n}a_{m}})^{2} = N_{a,b,m} · 10^{3k+j} + M_{a,b,m}

holds by (6). Multiplying through by N_{a,b,m}^{2} · 10^{2j} and regrouping, we find that

(N_{a,b,m} · 10^{j} · 3\sqrt{a_{m}b_{n}a_{m}})^{2} = (N_{a,b,m} · 10^{j+k})^{3} + N_{a,b,m}^{2} · 10^{2j} · M_{a,b,m}.

Consequently, Φ(n) ∈ L_{a,b,m,j}, establishing that the image of Φ is contained in the stated codomain. On reading this argument backward, we deduce that Φ is surjective. What remains is to show that Φ is injective.

For this, suppose that n = 3k + j ∈ Q_{a,b,m} and n′ = 3k′ + j′ ∈ Q_{a,b,m} are such that Φ(n) = Φ(n′). Then

(N_{a,b,m} · 10^{j+k}, N_{a,b,m} · 10^{j} · 3\sqrt{a_{m}b_{n}a_{m}}) = (N_{a,b,m} · 10^{j′+k′}, N_{a,b,m} · 10^{j′} · 3\sqrt{a_{m}b_{n′}a_{m}}). (8)

By comparing the first coordinates, we find that j + k = j′ + k′. Note that since a, m are nonzero, a_{m}b_{n}a_{m} is not divisible by 10. Thus \sqrt{a_{m}b_{n}a_{m}} is not divisible by 10 (nor is \sqrt{a_{m}b_{n′}a_{m}}). Thus comparing the second coordinates of (8), we find that j = j′. Since j + k = j′ + k′ and j = j′, we have that n = n′.

The above proposition, along with the data from Table 4 (Appendix), gives an alternate proof that none of the thirteen families in F contain a perfect square. To illustrate, let us consider the family 42 ⋯ 24. Here, (a, b, m) = (4, 2, 1) and the corresponding elliptic curves for j ∈ {0, 1, 2} are

E_{4,2,1,0} : y^{2} = x^{3} + 23104 · 10^{2}
E_{4,2,1,1} : y^{2} = x^{3} + 23104 · 10^{4}
E_{4,2,1,2} : y^{2} = x^{3} + 23104 · 10^{6}.

Using Magma [3], we compute their integral points:

E_{4,2,1,0}(ℤ) = {(80, ±1680), (0, ±1520), (1520, ±59280), (−76, ±1368)}
E_{4,2,1,1}(ℤ) = {(0, ±15200)}
E_{4,2,1,2}(ℤ) = {(0, ±152000)}.

None of these points are of the form (N_{a,b,m} · 10^{j+k}, N_{a,b,m} · 10^{j} · 3y) for nonnegative integers y, k. Hence,

L_{4,2,1,0} = L_{4,2,1,1} = L_{4,2,1,2} = ∅.

So, by Proposition 5, we conclude that the family 42 ⋯ 24 contains no perfect squares.

6 Other bases

So far, we have defined and studied curious numbers in base-ten. A natural generalization is to consider curious numbers represented in an arbitrary base. For a base B ≥ 2, we say that an integer is a curious number base-B if its base-B representation is of the form a ⋯ ab ⋯ ba ⋯ a. While little is mathematically special about base-ten, there are two fortuitous properties that we exploited in our search for perfect squares among the base-ten curious numbers. Namely, for B = 10, the following two properties both hold.

1. The integer 9, which is B − 1, is a perfect square.

2. For j sufficiently large, there is no base-ten repdigit square modulo B^{j}.

The first property is used in §2, specifically in the left-hand side of (6), which yields the relevant elliptic curves. While this property is useful in reducing the complexity of the coefficients of the elliptic curves, it not essential, and we can proceed without it. On the other hand, the second property listed above critical for our method. As we shall discuss below, it is responsible for the existence of the positive integer k (which we took to be 7) appearing in §3.

Regarding the first property above: Fix a base B ≥ 2 to be considered. Proceeding as in §2, one finds that the base-B analog of (6), without the assumption that B − 1 is a perfect square, is

(B − 1)y^{2} = N_{B,a,b,m}B^{n} + M_{B,a,b,m},  (9)

where

M_{B,a,b,m} := B^{m}(a − b) − a and N_{B,a,b,m} := B^{m}(aB^{m} + b − a).

Write n = 3k + j with j ∈ {0, 1, 2}. Multiplying (9) through by (B − 1)^{3}B^{2j}N_{B,a,b,m}^{2},

((B − 1)^{2}B^{j}N_{B,a,b,m}y)^{2} = (N_{B,a,b,m}(B − 1)B^{j+k})^{3} + M_{B,a,b,m}N_{B,a,b,m}^{2}(B − 1)^{3}B^{2j}. (10)

In analogy with Proposition 5, the base-B curious squares in a given base-B single variable family (a, b, m) correspond to certain integral points on the elliptic curves with j ∈ {0, 1, 2} given by

E_{B,a,b,m,j} : y^{2} = x^{3} + B_{a,b,m,j}, where B_{B,a,b,m,j} := M_{B,a,b,m}N_{B,a,b,m}^{2}(B − 1)^{3}B^{2j}.

As with base-ten, in order to apply the above method, we need to first limit the search to only finitely many single variable families. Here the second property above is pivotal. The property fails to hold if, for instance, B ≥ 3 is an odd integer. For such a B, it is easy to verify that for each positive integer j, the integer \frac{B^{j}−1}{B−1} is both a base-B repdigit (its base-B representation is 1 ⋯ 1, with 1 repeated j times) and a square modulo B^{j}. However the preimage of a base-B repdigit under the reduction map {curious numbers base-B} ⟶ ℤ/B^{j}ℤ is neither a singleton nor a single variable family. For this reason, the methods of §4 and §5 cannot be used if B ≥ 3 is odd.

We now consider those bases for which the analogue of the second property above holds. Let B denote the set of such bases, i.e., those B ≥ 2 with the property that for j sufficiently large, there is no base-B repdigit square modulo B^{j}. Via a computer search, we determine that

B ∩ {2, 3, …, 100000} = {2, 4, 6, 10, 12, 20, 28, 42, 60} .

Considering this numerical evidence, we conjecture that B is equal to the set on the righthand side of the above equation. A proof of this claim has remained elusive to the authors, except the partial results that B contains no odd integers (mentioned above) and contains no integers divisible by 8 (via a similar argument).

For a base B ∈ B, let j_{B} be a positive integer such that there are no base-B repdigits that are squares modulo B^{j_{B}}. Let π : ℤ ⟶ ℤ/B^{j_{B}}ℤ denote the reduction map. Let X denote the intersection of the set of base-B curious numbers and the set of perfect squares. Each member of π(X) contains two distinct base-B digits, including leading zeros. Hence the preimage of each member of π(X) under the map {curious numbers base-B} ⟶ ℤ/B^{j_{B}}ℤ is either a singleton or a single variable family. In this way, the search for base-B curious squares is reduced to searching within finitely many single variable families, which may be done via the elliptic curve method of §5.

By the steps described above and Siegel’s theorem [13, Thm. IX.3.1], it follows that for each B ∈ B, the set of base-B curious squares is finite and effectively computable. For B ∈ {2, 4, 6, 12}, we determine all base-B curious squares by computing integrals points on the corresponding elliptic curves. In principle, the same process works for B ∈ {20, 28, 42, 60} as well. However, the quantity and complexity of the elliptic curves involved makes this a daunting computational task.

Theorem 6. For each B ∈ B, the set of base-B curious squares is finite and effectively computable. Moreover, for B ∈ {2, 4, 6, 12}, the base-B curious squares are listed below in base-B representation.

Base B Curious squares base-B
2  0, 1, 1001
4  0, 1, 121
6  0, 1, 4, 121
12  0, 1, 4, 9, 121, 484, 16661, 44944

Table 3: Curious squares in other bases.

A preliminary computer search hints that there might be only finitely many curious squares base-B for each base B ≥ 2. Aside from those bases addressed above, both the finiteness question and the problem of actually determining all base-B curious squares remain open for these other bases.

7 Higher powers

Another natural direction is to determine for a fixed integer q > 2, the curious numbers that are perfect qth powers. There are two significant difficulties with applying our approach to odd q > 2. Whereas for q = 2 we are successful in reducing the search to finitely many single variable families in base ten (as well as certain other bases in §6), computations reveal that for odd q with 3 ≤ q ≤ 100 no such reduction can be made. The second challenge with such a consideration is that the exponent of y appearing in the qth-power analogue of (6) is greater than 2. Namely, (6) becomes

9y^{q} = N_{a,b,m} · 10^{n} + M_{a,b,m}.  (11)

The solutions to this equation are integral points on certain superelliptic curves. Whereas for elliptic curves Magma and SageMath have commands for determining integral points, less is known for superelliptic curves and no such functionality yet exists in these programming languages. Hence, the question for higher powers would likely require techniques outside of those given in this paper.

8 Acknowledgments

We are grateful to the referees who reviewed our paper and offered feedback to help improve it in numerous respects. In addition, we thank Tian Wang for insightful discussions related to Goddard and Rouse’s paper [7].

Appendix

Family j B_{a,b,m,j} Integral points of E_{a,b,m,j} : y^{2} = x^{3} + B_{a,b,m,j} up to sign

10 ⋯ 01 0 729 · 10^{2}  {\{(−36, 162), (0, 270), (40, 370), (45, 405), (180, 2430), \atop (216, 3186), (23940, 3704130)\}}
1 729 · 10^{4}  {(0, 2700)}
2 729 · 10^{6}  {(−900, 0), (1800, 81000), (0, 27000)}
14 ⋯ 41 0 −5239 · 10^{2}  {\{(100, 690), (140, 1490), (160, 1890), (1589, 63337), \atop (28261, 4750959)\}}
1 −5239 · 10^{4}  {(376, 876)}
2 −5239 · 10^{6}  {(3500, 194000)}
18 ⋯ 81 0 −20519 · 10^{2} {(960, 29710)}
1 −20519 · 10^{4} ∅
2 −20519 · 10^{6} ∅

Table 4: Integral points data for §5

40 ⋯ 04  0 46656 · 10^{2}  {(−144, 1296), (−135, 1485), (0, 2160), (160, 2960), ; (180, 3240), (720, 19440), (864, 25488), (95760, ; 29633040)}
1 46656 · 10^{4}  {(0, 21600)}
2 46656 · 10^{6}  { (−3600, 0), (0, 216000), (7200, 648000)}
42 ⋯ 24  0 23104 · 10^{2}  {(−76, 1368), (0, 1520), (80, 1680), (1520, 59280)}
1 23104 · 10^{4}  {(0, 15200)}
2 23104 · 10^{6}  {(0, 152000)}
442 ⋯ 244 0 31047184 · 10^{4}  {\{(−4975, 432825), (0, 557200), (5600, 697200), (44576, \atop 9427824)\}}
1 31047184 · 10^{6}  {(0, 5572000), (8959776, 26819194976)}
2 31047184 · 10^{8}  {\{(−84000, 50120000), (0, 55720000), (1671600, \atop 2161936000)\}}
4443 ⋯ 3444 0 15928032996 · 10^{6}  {(198400, 154070000)}
1 15928032996 · 10^{8}  {(−356000, 1244060000)}
2 15928032996 · 10^{10}  ∅
4447 ⋯ 7444 0 −48136123036 · 10^{6}  ∅
1 −48136123036 · 10^{8}  ∅
2 −48136123036 · 10^{10} ∅
52 ⋯ 25  0 55225 · 10^{2}  {(0, 2350)}
1 55225 · 10^{4}  {(0, 23500)}
2 55225 · 10^{6}  {(0, 235000)}
65 ⋯ 56  0 13924 · 10^{2}  {(0, 1180), (80, 1380), (944, 29028)}
1 13924 · 10^{4}  {(0, 11800)}
2 13924 · 10^{6}  {\{(−2400, 10000), (0, 118000), (4425, 317125), (751296, \atop 651203344)\}}
90 ⋯ 09  0 531441 · 10^{2}  {\{ (−324, 4374), (0, 7290), (360, 9990), (405, 10935), \atop (1620, 65610), (1944, 86022), (215460, 100011510)\}}
1 531441 · 10^{4}  {(0, 72900)}
2 531441 · 10^{6}  {(−8100, 0), (0, 729000), (16200, 2187000)}
94 ⋯ 49  0 296225 · 10^{2}  {\{(−200, 4650), (−100, 5350), (349, 8493), (10300, \atop 1045350)\}}
1 296225 · 10^{4}  {\{(−800, 49500), (200, 54500), (625, 56625), (11416, \atop 1220964)\}}
2 296225 · 10^{6}  ∅
98 ⋯ 89  0 7921 · 10^{2}  {(0, 890)}
1 7921 · 10^{4}  {(−400, 3900), (0, 8900), (1424, 54468)}
2 7921 · 10^{6}  {(0, 89000), (8400, 775000)}

Table 4 (Continued): Integral points data for §5

References

[1] M. A. Bennett and A. Levin, The Nagell–Ljunggren equation via Runge’s method, Monatsh. Math. 177 (2015), 15–31.

[2] A. Bridy, R. J. Lemke Oliver, A. Shallit, and J. Shallit, The generalized Nagell– Ljunggren problem: powers with repetitive representations, Exp. Math. 28 (2019), 428– 439.

[3] W. Bosma, J. Cannon and C. Playoust, The Magma algebra system I: The user language, J. Symbolic Comput. 24 (1997), 235–265.

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

[5] Y. Bugeaud and P. Mihăilescu, On the Nagell-Ljunggren equation \frac{x^{n}−1}{x−1} = y^{q}, Math. Scand. 101 (2007), 177–183.

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

[7] B. Goddard and J. Rouse, Sum of two repdigits a square, Integers 17 (2017), Paper A24.

[8] W. Ljunggren, Noen setninger om ubestemte likninger av formen (x^{n} − 1)/(x − 1) = y^{q}, Norsk Mat. Tidsskr. 25 (1943), 17–20.

[9] T. Nagell, Des équations indéterminées x^{2} + x + 1 = y^{n} et x^{2} + x + 1 = 3y^{n}, Norsk Mat. Forenings Skr. 1 (1921).

[10] T. Nagell, Note sur l’équation indéterminée (x^{n} − 1)/(x − 1) = y^{q}, Norsk Mat. Tidsskr. 2 (1920), 75–78.

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

[12] The Sage Developers, SageMath, The Sage Mathematics Software System (Version 9.0),

2020. Available at https://www.sagemath.org.

[13] J. H. Silverman, The Arithmetic of Elliptic Curves, Springer, 2009.

[14] N. J. A. Sloane et al., The On-Line Encyclopedia of Integer Sequences, 2020. Available

at https://oeis.org.

[15] I. Stewart, Professor Stewart’s Hoard of Mathematical Treasures, Basic Books, 2010.

2010 Mathematics Subject Classification: Primary 11A63; Secondary 11A07, 11G05. Keywords: repdigit, palindromic number, square number, elliptic curve, integral point.

(Concerned with sequences \underline{A002113}, \underline{A010785}, and \underline{A335779}.)

Received October 11 2020; revised versions received June 19 2021; June 20 2021. Published in Journal of Integer Sequences, June 29 2021.

Return to Journal of Integer Sequences home page.