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

\usepackage{adjustbox}
\usepackage{mathtools}
\usepackage{caption}

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

\def\set#1{\left\{ #1 \right\}}
\def\ord{\operatorname{ord}}
\def\Z{\mathbb{Z}}
\def\Q{\mathbb{Q}}

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

\begin{center}
\vskip 1cm{\LARGE\bf 
Square Curious Numbers
}
\vskip 1cm
\large
Neelima Borade and Jacob Mayle \\ 
University of Illinois at Chicago \\ 
Department of Mathematics, Statistics and Computer Science \\
Chicago, IL 60302-7045 \\ 
USA \\ 
\href{mailto:nborad2@uic.edu}{\tt nborad2@uic.edu} \\
\href{mailto:jmayle2@uic.edu}{\tt jmayle2@uic.edu}
\end{center}

\vskip .2 in

\begin{abstract}  
A \textit{curious number} is a palindromic number whose base-ten representation has the form $a \cdots a b \cdots b a \cdots 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.
\end{abstract}

\section{Introduction}

Ian Stewart begins his popular recreational mathematics book \textit{Professor Stewart's Hoard of Mathematical Treasures} \cite{St2010} with the following ``calculator curiosity'':
{\small
\begin{align*}
(8 \times 8) + 13 &= 77 \\
(8 \times 88) + 13 &= 717 \\
(8 \times 888) + 13 &= 7117 \\
(8 \times 8888) + 13 &= 71117 \\
(8 \times 88888) + 13 &= 711117 \\
(8 \times 888888) + 13 &= 7111117 \\
(8 \times 8888888) + 13 &= 71111117 \\
(8 \times 88888888) + 13 &= 711111117.
\end{align*}
}%
The numbers on the right of the equations above are examples of what we call \textit{curious numbers}.

\begin{definition} \label{main-def} Let $m,n$ be integers with $m \geq 0$ and $n \geq 1$. An integer is an  \textit{$(m,n)$-curious number} if its base-ten representation is
\[ \underbrace{a \cdots a}_{m} \underbrace{b \cdots b}_{n} \underbrace{a \cdots a}_{m} \]
for some integers $a,b$ satisfying $1 \leq a \leq 9$ and $0 \leq b \leq 9$. By convention, when $m = 0$,
\[
\underbrace{a \cdots a}_{0} \underbrace{b \cdots b}_{n} \underbrace{a \cdots a}_{0} \coloneqq \underbrace{b \cdots b}_{n}.
\]
A nonnegative integer is called a \textit{curious number} if it is an $(m,n)$-curious number for some integers $m,n$ with $m \geq 0$ and $n \geq 1$. 
\end{definition}

The sequence of curious numbers, listed as \seqnum{A335779} in the On-Line Encyclopedia of Integer Sequences (OEIS) \cite{OEIS}, 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,\ldots. \]
The sequence of palindromes, listed as \seqnum{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 \seqnum{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\cdots17$ 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, \, \text{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 \textit{Obl\'ath's problem}. After Obl\'ath's  \cite{Ob1956} partial solution, the problem was fully solved by Bugeaud and  Mignotte \cite{BM1999} using bounds on $p$-adic logarithms. Variations on Obl\'ath's problem have been studied by several authors. For instance, Gica and Panaitopol \cite{GP2003} determined all perfect squares among the \textit{near repdigits}, which are integers for which all but a single digit are equal. Recently, Goddard and Rouse \cite{GR2017}  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., \textit{curious squares}). Specifically, we prove the following result, which is our main theorem.
\begin{theorem} \label{main-thrm} The curious numbers that are perfect squares are precisely the following:
\[ 0, \, 1,\, 4,\, 9,\, 121,\, 484,\, 676, \text{ and } 44944. \]
\end{theorem}
Broadly speaking, our proof of Theorem \ref{main-thrm} runs as follows. First, in \S \ref{alg-reform}, we recast the problem in algebraic terms. Next, in \S \ref{mod107}, 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 \S \ref{modfamilies}, proceeds by studying the families via modular arithmetic. This approach is somewhat ad hoc, whereas our second method, given in \S \ref{elliptic},  is more systematic. Here we study the families via integral points on elliptic curves, along the lines of Goddard and Rouse \cite[\S4]{GR2017}.

Related to Obl\'ath's problem is the problem of Nagell-Ljunggren \cite{Lj1943,Na1920a,Na1920b}. Here the objective is to find all triples $(B,n,q)$ such that the length-$n$ base-$B$ repunit $1\cdots1_B$ is a perfect $q$th power. This problem and variants of it have been studied extensively \cite{BL2015,BL2019,BM2007}. It serves as motivation for us to consider our main problem  in other bases and for higher powers. In \S\ref{otherbases}, we solve our problem for certain other bases that are amenable to the elliptic curve technique. In \S\ref{higherpowers}, we comment on some of the difficulties that arise in considering cubic and higher powers.


\section{Algebraic reformulation} \label{alg-reform}

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,
\begin{equation} \label{repdigit} a_m \coloneqq \underbrace{a \cdots a}_m = a \cdot \frac{10^m-1}{10-1}. \end{equation}
Now observe that
\begin{equation} \label{cur-notation}  a_mb_na_m \coloneqq
\underbrace{a \cdots a}_{m} \underbrace{b \cdots b}_{n} \underbrace{a \cdots a}_{m} = 10^{m+n} \cdot a_m + 10^m \cdot b_n + a_m.
\end{equation}
Note that in the shorthand $ a_mb_na_m$, juxtaposition denotes concatenation rather than multiplication.

Upon combining equations (\ref{repdigit}) and (\ref{cur-notation}), we obtain an expression for curious numbers, 
\begin{equation} \label{exp1}
a_mb_na_m
= a \cdot 10^{m+n} \cdot \frac{10^m-1}{10-1} + b \cdot 10^m \cdot \frac{10^n-1}{10-1} + a\cdot \frac{10^m-1}{10-1}. \\
 \end{equation}
To streamline matters, we define the integers
\begin{equation} \label{MN}
    M_{a,b,m} \coloneqq 10^m \cdot (a-b) - a \quad \text{ and } \quad
    N_{a,b,m} \coloneqq  10^m \cdot (a \cdot 10^m + b - a).
\end{equation}
After some regrouping, (\ref{exp1}) becomes
\begin{equation} \label{cur-alg-clean}
a_m b_n a_m
= \frac{1}{9} \left(N_{a,b,m} \cdot 10^n + M_{a,b,m}\right)\!.
\end{equation}

We are interested in determining the collection of $a_mb_na_m$ that are perfect squares. Thus, by multiplying (\ref{cur-alg-clean}) through by 9, we record that our problem reduces to solving the equation 
\begin{equation} \label{alg-eq} (3y)^2 = N_{a,b,m} \cdot 10^n + M_{a,b,m}  \end{equation}
in the nonnegative integers $a,b,m,n,y$ with the restrictions that $n \geq 1$, $1 \leq a \leq 9$, and $0 \leq b \leq 9$.







\section{Narrowing search to several single variable families} \label{mod107}


Let $\mathcal{C}_{m,n}$ denote the set of $(m,n)$-curious numbers and write $\mathcal{C} = \bigcup_{m \geq 0, n \geq 1} \mathcal{C}_{m,n}$ for the set of all curious numbers. Let $\mathcal{S}$ denote the set of all perfect squares. For each positive integer $k$, define the set
\[ \mathcal{S}_k \coloneqq \set{s^2 \in \mathcal{S} : s \leq k}\!. \]
Finally, we denote the reduction modulo $10^7$ map by
\[\pi: \Z \longrightarrow \Z/10^7\Z.\]

In the notation above, our ultimate objective is to determine the intersection $\mathcal{C} \cap \mathcal{S}$. We start by computing the intersection $\pi(\mathcal{C}) \cap \pi(\mathcal{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 \geq 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 $\pi(\mathcal{C})$ and $\pi(\mathcal{S})$ may be realized as
\[ \pi(\mathcal{C}) = \bigcup_{\substack{(m,n) \\ 0 \leq m \leq 7 \\ 1 \leq n \leq 7-m}} \pi(\mathcal{C}_{m,n}) \quad \text{and} \quad \pi(\mathcal{S}) = \pi(\mathcal{S}_{10^{7}}). \]
As the sets $\mathcal{C}_{m,n}$ and $\mathcal{S}_{10^{7}}$ are finite and of reasonable size, it is straightforward to determine $\pi(\mathcal{C})$ and $\pi(\mathcal{S})$ with a computer. We do so using SageMath \cite{SAGE}, and find their intersection
\[ \pi(\mathcal{C}) \cap \pi(\mathcal{S}) =
 \begin{minipage}[t]{.75\textwidth}
 \{\!\! 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 \!\}.
 \end{minipage}
\]

We have that $\pi(\mathcal{C} \cap \mathcal{S}) \subseteq \pi(\mathcal{C}) \cap \pi(\mathcal{S})$. Those elements of $\pi(\mathcal{C}) \cap \pi(\mathcal{S})$ whose preimage under the map $\mathcal{C} \overset{\pi}{\longrightarrow} \Z/10^7\Z$ consists of a single non-square integer are not members of $\pi(\mathcal{C} \cap \mathcal{S})$. For instance, the preimage of $4333444$ under $\mathcal{C} \overset{\pi}{\longrightarrow} \Z/10^7\Z$ is the singleton $\set{444333444}$. Since $444333444$ is not a perfect square, we ascertain that $4333444 \not\in \pi(\mathcal{C} \cap \mathcal{S})$. Proceeding in this way, we find that
\[ \pi(\mathcal{C} \cap \mathcal{S}) \subseteq
 \begin{minipage}[t]{.75\textwidth}
 \{\!\! 0,
 1,
 4,
 9,
 121,
 484,
 676,
 44944,
 2222224,
 2222225,
 2222244,
 3333444,
 4444441,
 4444449,
 5555556,
 7777444,
 8888881,
 8888889 \!\}.
 \end{minipage}
\]

Taking the preimage of the above set inclusion under $\mathcal{C} \overset{\pi}{\longrightarrow} \Z/10^7\Z$, we deduce that 
\begin{equation} \mathcal{C} \cap \mathcal{S} \subseteq
 \begin{minipage}[t]{.75\textwidth}
 \{\!\! 
 0,
 1,
 4,
 9,
 121,
 484,
 676,
 44944, 
 $10\cdots01$, 
 $14\cdots41$, 
 $18\cdots81$, 
 $40\cdots04$, 
 $42\cdots24$, 
 $442\cdots244$, 
 $4443\cdots3444$,
 $4447\cdots7444$,
 $52\cdots25$,
 $65\cdots56$,
 $90\cdots09$,
 $94\cdots49$,
 $98\cdots89$ \!\}. 
 \end{minipage} \label{CSpos}
\end{equation}
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\cdots3444$ to denote the family
\[ 4443\cdots3444 \coloneqq \{444\underbrace{3\cdots3}_n444 : n \geq 1\}. \]

The assertion of Theorem \ref{main-thrm} is that $\mathcal{C} \cap \mathcal{S} = \set{0, \, 1, \, 4, \, 9, \, 121, \, 484, \, 676, \, 44944}$. Thus, by (\ref{CSpos}), it suffices to prove that there does not exist a perfect square in any of the thirteen single variable families in the set $\mathcal{F}$ below
 \[ \mathcal{F} \coloneqq 
  \begin{minipage}[t]{.8\textwidth}
 $\{10\cdots01$,
 $14\cdots41$,
 $18\cdots81$,
 $40\cdots04$,
 $42\cdots24$,
 $442\cdots244$,
 $4443\cdots3444$,
 $4447\cdots7444$,
 $52\cdots25$,
 $65\cdots56$,
 $90 \cdots 09$,
 $94\cdots49$,
 $98\cdots89\}$.
 \end{minipage}
\]

\section{Considering families via modular arithmetic} \label{modfamilies}


In this section, we use modular arithmetic considerations to prove that none of the families in $\mathcal{F}$ contain a square. Let us begin by considering $10\cdots01$. 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\cdots04$ and $90\cdots09$ is a square multiple of a number in $10\cdots01$, 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 $\mathcal{F}$ contain no squares. For each of these families,
in Table~\ref{MN_table} we record 
the coefficients  $M_{a,b,m}$ and $N_{a,b,m}$, as defined in (\ref{MN}).
\begin{table}[htb]  \centering
\begin{tabular}{|lcccrr|} \hline
Family           & $a$ & $b$ & $m$ & $M_{a,b,m}$ & $N_{a,b,m}$ \\ \hline
$14\cdots41$     & 1   & 4   & 1   & $-31$       & 130         \\
$18\cdots81$     & 1   & 8   & 1   & $-71$       & 170         \\
$42\cdots24$     & 4   & 2   & 1   & 16          & 380         \\
$442\cdots244$   & 4   & 2   & 2   & 196         & 39800       \\
$4443\cdots3444$ & 4   & 3   & 3   & 996         & 3999000     \\
$4447\cdots7444$ & 4   & 7   & 3   & $-3004$     & 4003000     \\
$52\cdots25$     & 5   & 2   & 1   & 25          & 470         \\
$65\cdots56$     & 6   & 5   & 1   & 4           & 590         \\
$94\cdots49$     & 9   & 4   & 1   & 41          & 850         \\
$98\cdots89$     & 9   & 8   & 1   & 1           & 890 \\ \hline       
\end{tabular}
\caption{Families of possible solutions.} \label{MN_table}
\end{table}
We rule out the possibility of perfect squares in each of the families in
Table~\ref{MN_table} via two elementary lemmas. 

\begin{lemma} \label{mod-lem} If $M_{a,b,m}$ is a quadratic non-residue modulo $N_{a,b,m}$, then $a_mb_na_m$ is not a square for each $n \geq 1$.
\end{lemma}
\begin{proof} This follows from (\ref{alg-eq}) upon reducing modulo  $N_{a,b,m}$.
\end{proof}


For instance, let us consider the family $14\cdots41$ in view of the above lemma. From Table~\ref{MN_table}, 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\cdots41$ contains no perfect squares. Applying Lemma \ref{mod-lem} to the data from Table \ref{MN_table} in this way for each of the ten families, we conclude that none of the following five families contain a perfect square:
\[ 14\cdots41, \, 18\cdots81, \, 4443\cdots3444, \, 4447\cdots7444, \, \text{and } 94\cdots49. \]



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

\begin{lemma} \label{mod-lem2} Let $N$ be a positive integer with $\gcd(N,10) = 1$. If for each integer $k$ with $0 \leq k < \ord_N(10)$, we have that $N_{a,b,m} \cdot 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 \geq 1$.
\end{lemma}
\begin{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 \coloneqq \sqrt{a_m b_{n_0}a_m}$ give a solution to (\ref{alg-eq}). Write $k_0$ to denote the integer for which $0 \leq k_0 < \ord_N(10)$ and $k_0 \equiv n_0 \pmod{\ord_N(10)}$. Then $10^{n_0} \equiv 10^{k_0} \pmod{N}$, so upon reducing (\ref{alg-eq}) modulo $N$, we find that
\[ N_{a,b,m} \cdot 10^{k_0} + M_{a,b,m} \equiv N_{a,b,m} \cdot 10^{n_0} + M_{a,b,m} \equiv (3y)^2 \pmod{N}. \]
Hence, $N_{a,b,m} \cdot 10^{k_0} + M_{a,b,m}$ is a quadratic residue modulo $N$.
\end{proof}

Using SageMath \cite{SAGE}, we search for (and find) appropriate $N$ as in Lemma \ref{mod-lem2} for each of five remaining families. The relevant data is tabulated in Table~\ref{tab1}.
\begin{table}[htb] \centering
\begin{tabular}{|llll|}
\hline
Family         & $N$     & $\ord_N(10)$ & $N_{a,b,m} \cdot 10^k + M_{a,b,m} \bmod N$ \, for\, $0 \leq k < \ord_N(10)$ \\ \hline
$42\cdots24$   & $999$   & $3$             & $396, \, 819, \, 54$                                                                \\ 
$442\cdots244$ & $77$    & $6$             & $33, \, 29, \, 66, \, 51, \, 55, \, 18$                                                      \\ 
$52\cdots25$   & $91$    & $6$             & $40, \, 84, \, 69, \, 10, \, 57, \, 72$                                                      \\ 
$65\cdots56$   & $13837$ & $8$             & $594, \, 5904, \, 3656, \, 8850, \, 5442, \, 12873, \, 4161, \, 63$                                \\ 
$98\cdots89$   & $1001$  & $6$             & $891, \, 893, \, 913, \, 112, \, 110, \, 90$                                                 \\ \hline 
\end{tabular}
\caption{Data for the five remaining families.}
\label{tab1}
\end{table}

Together with Lemma \ref{mod-lem2}, this data proves that none of the five remaining families contain a perfect square. To highlight an example, let us consider the family $42\cdots24$. 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 \ref{mod-lem2} implies that the family in question contains no perfect squares.


\section{Considering families via elliptic curves} \label{elliptic} 
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 \textit{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 \in \Q$ with nonzero discriminant $\Delta \coloneqq -16(4a^3 + 27b^2)$. The set of \textit{integral points} of $E$ is 
\[ E(\mathbb{Z}) \coloneqq \set{(x,y) \in \Z \times \Z : y^2 = x^3 + ax + b}\!. \]
This set is finite and fairly computable. See, for instance, Silverman \cite[Chp.\ IX]{Si2009} for a thorough treatment of integral points on elliptic curves. In what follows, we use the \texttt{IntegralPoints} command in Magma \cite{MAGM} 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 \leq a \leq 9$, $0 \leq b \leq 9$. Consider the single variable family 
\[ \set{a_m b_n a_m : n \geq 1}. \]
We are interested in determining its squares, i.e., the set
\[
Q_{a,b,m} \coloneqq \set{n \geq 1 : a_mb_na_m \text{ is a perfect square}}\!.
\]
For each $j \in \set{0,1,2}$, we define
\[ B_{a,b,m,j} \coloneqq  N_{a,b,m}^{2}\cdot10^{2j}\cdot 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
\[    \Delta  =   -16(4\cdot0^3 +27\cdot B_{a,b,m,j}^{2}) = -16\cdot27\cdot B_{a,b,m,j}^{2} \neq 0.
\]
We are interested in the integral points of $E_{a,b,m,j}$ and, more specifically, the subset
\[
L_{a,b,m,j} \coloneqq E_{a,b,m,j}(\Z) \cap \set{( N_{a,b,m}\cdot10^{j+k} , N_{a,b,m}\cdot10^{j}\cdot3y) \in \Z \times \Z : k,y \geq 0}.
\]



\begin{proposition}\label{ell} In the notation above, we have a bijection
\begin{align*} \Phi: Q_{a,b,m} &\longrightarrow L_{a,b,m,0} \cup L_{a,b,m,1} \cup L_{a,b,m,2}  \\
 n = 3k + j &\longmapsto  ( N_{a,b,m}\cdot10^{j+k} , N_{a,b,m}\cdot10^{j}\cdot 3\sqrt{a_m b_n a_m}),
\end{align*}
where we write $n = 3k + j$ for integers $j,k$ with $j \in \set{0,1,2}$.
\end{proposition}
\begin{proof} The map $\Phi$ is well-defined. Indeed, the decomposition $n = 3k +j$ with $j \in \set{0,1,2}$ is unique and we now verify that the image of $\Phi$ is contained in the stated codomain. If $n = 3k+j \in Q_{a,b,m}$, then
\[
(3 \sqrt{a_m b_n a_m})^2  = N_{a,b,m}\cdot10^{3k+j} + M_{a,b,m}
\]
holds by (\ref{alg-eq}). Multiplying through  by $N_{a,b,m}^{2}\cdot10^{2j}$ and regrouping, we find that
\begin{equation*}
(N_{a,b,m}\cdot10^{j}\cdot3\sqrt{a_mb_na_m})^{2} = (N_{a,b,m}\cdot10^{j+k})^{3} + N_{a,b,m}^{2}\cdot10^{2j}\cdot M_{a,b,m}.
\end{equation*}
Consequently, $\Phi(n) \in L_{a,b,m,j}$, establishing that the image of $\Phi$ is contained in the stated codomain. On reading this argument backward, we deduce that $\Phi$ is surjective. What remains is to show that $\Phi$ is injective.

 For this, suppose that $n = 3k+j \in Q_{a,b,m}$ and $n'=3k'+j' \in Q_{a,b,m}$  are such that $\Phi(n) = \Phi(n')$. Then
\begin{equation} \label{ell_inj}
( N_{a,b,m}\cdot10^{j+k} , N_{a,b,m}\cdot10^{j}\cdot 3\sqrt{a_m b_n a_m}) = ( N_{a,b,m}\cdot10^{j'+k'} , N_{a,b,m}\cdot10^{j'}\cdot 3\sqrt{a_m b_{n'} a_m}).
\end{equation}
By comparing the first coordinates, we find that $j+k = j' + k'$. Note that since $a,m$ are nonzero, $a_mb_na_m$ is not divisible by $10$. Thus $\sqrt{a_mb_na_m}$ is not divisible by 10 (nor is  $\sqrt{a_mb_{n'}a_m}$). Thus comparing the second coordinates of (\ref{ell_inj}), we find that $j = j'$. Since $j + k = j' + k'$ and $j = j'$, we have that $n = n'$.
\end{proof}


The above proposition, along with the  data from Table \ref{elliptic_table} (Appendix), gives an alternate proof that none of the thirteen families in
$\mathcal{F}$ contain a perfect square. 
To illustrate, let us consider the family
$42\cdots24$. Here, $(a,b,m) = (4,2,1)$ and the  corresponding elliptic curves for $j \in \{0,1,2\}$ are
\begin{align*}
     E_{4,2,1,0}: y^2 &= x^3 + 23104\cdot 10^{2}\\
     E_{4,2,1,1}: y^2 &= x^3 + 23104\cdot 10^{4}\\
     E_{4,2,1,2}: y^2 &= x^3 + 23104\cdot 10^{6}.
\end{align*}
Using Magma \cite{MAGM}, we compute their integral points:
\begin{align*}
     E_{4,2,1,0}(\Z) &= \{(80, \pm 1680), (0, \pm1520), (1520, \pm59280), (-76, \pm1368)\} \\
     E_{4,2,1,1}(\Z) &=  \{(0, \pm15200)\} \\
     E_{4,2,1,2}(\Z) &= \{(0, \pm152000)\}.
\end{align*}
None of these points are of the form $( N_{a,b,m}\cdot10^{j+k} , N_{a,b,m}\cdot10^{j}\cdot3y)$ for  nonnegative integers $y,k$. Hence, 
\[ L_{4,2,1,0} = L_{4,2,1,1} = L_{4,2,1,2} = \emptyset. \]
So, by Proposition \ref{ell}, we conclude that the family $42\cdots24$ contains no perfect squares.

\section{Other bases}\label{otherbases}

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 \geq 2$, we say that an integer is a \textit{curious number base-$B$} if its base-$B$ representation is of the form $a\cdots a b \cdots b a \cdots 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.
\begin{enumerate}
    \item The integer $9$, which is $B-1$, is a perfect square.
    \item For $j$ sufficiently large, there is no base-ten repdigit square modulo $B^j$.
\end{enumerate}


The first property is used in \S\ref{alg-reform}, specifically in the left-hand side of   (\ref{alg-eq}), 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 \S\ref{mod107}.

Regarding the first property above: Fix a base $B \geq 2$ to be considered. Proceeding as in \S2, one finds that the base-$B$ analog of (\ref{alg-eq}), without the assumption that $B-1$ is a perfect square, is
\begin{equation} (B-1)y^2 = N_{B,a,b,m}   B^n + M_{B,a,b,m},  \label{alg-eq-B0} \end{equation}
where
\[ M_{B,a,b,m} \coloneqq B^m  (a-b) - a \quad \text{and} \quad N_{B,a,b,m} \coloneqq B^m  (a B^m + b - a). \]
Write $n = 3k+j$ with $j \in \set{0,1,2}$. Multiplying (\ref{alg-eq-B0}) through by $(B-1)^3B^{2j}N_{B,a,b,m}^2$,
\begin{equation} ((B-1)^2B^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)^3B^{2j}.  \label{alg-eq-B} \end{equation}
In analogy with Proposition \ref{ell}, 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 \in \set{0,1,2}$ given by
\[ E_{B,a,b,m,j}: y^2 = x^3 + B_{a,b,m,j},\quad \text{where } \;  B_{B,a,b,m,j} \coloneqq M_{B,a,b,m} N_{B,a,b,m}^2(B-1)^3B^{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 \geq 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\cdots1$, with $1$ repeated $j$ times) and a square modulo $B^j$. However the preimage of a base-$B$ repdigit under the reduction map $\set{\text{curious numbers base-}B} \longrightarrow \Z/B^j\Z$ is neither a singleton nor a single variable family. For this reason, the methods of \S\ref{modfamilies} and \S\ref{elliptic} cannot be used if $B \geq 3$ is odd. 

We now consider those bases for which the analogue of the second property above holds. Let $\mathcal{B}$ denote the set of such bases, i.e., those $B \geq 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
\[ \mathcal{B} \cap \set{2,3,\ldots,100000} =   \set{2, 4, 6, 10, 12, 20, 28, 42, 60}. \label{Bconj} \]
Considering this numerical evidence, we conjecture that $\mathcal{B}$ is equal to the set on the right-hand side of the above equation. A proof of this claim has remained elusive to the authors, except the partial results that $\mathcal{B}$  contains no odd integers (mentioned above) and contains no integers divisible by $8$ (via a similar argument).

For a base $B \in \mathcal{B}$, let $j_B$ be a positive integer such that there are no base-$B$ repdigits that are squares modulo $B^{j_B}$. Let $\pi:\Z \longrightarrow \Z/B^{j_B}\Z$ 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 $\pi(X)$ contains two distinct base-$B$ digits, including leading zeros. Hence the preimage of each member of $\pi(X)$  under the map $\set{\text{curious numbers base-}B} \longrightarrow \Z/B^{j_B}\Z$ 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 \S\ref{elliptic}.

By the steps described above and Siegel's theorem \cite[Thm.\ IX.3.1]{Si2009}, it follows that for each $B \in \mathcal{B}$, the set of base-$B$ curious squares is finite and effectively computable. For $B \in \set{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 \in \set{20,28,42,60}$ as well. However, the quantity and complexity of the elliptic curves involved makes this a daunting computational task.

\begin{theorem} For each $B \in \mathcal{B}$, the set of base-$B$ curious squares is finite and effectively computable. Moreover, for  $B \in \set{2,4,6,12}$, the base-$B$ curious squares are listed below in base-$B$ representation.
\begin{table}[htb] \centering
\begin{tabular}{|ll|}
\hline
Base $B$& Curious squares base-$B$           \\ \hline
2        & 0, 1, 1001                         \\
4        & 0, 1, 121                          \\
6        & 0, 1, 4, 121                       \\
12       & 0, 1, 4, 9, 121, 484, 16661, 44944 \\ \hline
\end{tabular}
\caption{Curious squares in other bases.}
\end{table}
\end{theorem}

A preliminary computer search hints that there might be only finitely many curious squares base-$B$ for each base $B \geq 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.


\section{Higher powers}\label{higherpowers}


Another natural direction is to determine for a fixed integer $q > 2$, the curious numbers that are perfect $q$th 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 \S\ref{otherbases}), computations reveal that for odd $q$ with $3 \leq q \leq 100$ no such reduction can be made. The second challenge with such a consideration is that the exponent of $y$ appearing in the $q$th-power analogue of (\ref{alg-eq}) is greater than 2. Namely, (\ref{alg-eq}) becomes
\begin{equation} \label{alg-eq-high-pow} 9y^q = N_{a,b,m} \cdot 10^n + M_{a,b,m} . \end{equation}
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.


\section{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 \cite{GR2017}.

\appendix
\section*{Appendix} \label{app}
\begin{table}[H] \centering
\begin{adjustbox}{width=0.8\textwidth}
\renewcommand*{\arraystretch}{1.25}
\begin{tabular}{|lllp{10cm}|} \hline
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     \\ \hline
$10\cdots01$      & 0   & $ 729 \cdot 10^2$                                                            & \{($-36$, 162), (0, 270), (40, 370), (45, 405), (180, 2430), (216, 3186), (23940, 3704130)\}                                                                                    \\
                   & 1   & $ 729\cdot 10^4$                                                          & \{(0, 2700)\}                                                                                                                                                                  \\
                  & 2   & $ 729\cdot 10^6$                                                        & \{($-900$, 0), (1800, 81000), (0, 27000)\}                                                                                                                                       \\ \hline
$14\cdots41$     & 0   & $ -5239\cdot 10^2$                & \{(100, 690), (140, 1490), (160, 1890), (1589, 63337), (28261, 4750959)\}                                                                                                      \\
                    & 1   & $ -5239\cdot 10^4$                                                         & \{(376, 876)\}                                                                                                                                                                 \\
                    & 2   & $ -5239\cdot 10^6$                                                       & \{(3500, 194000)\}                                                                                                                                                             \\ \hline
$18\cdots81$       & 0   & $ -20519\cdot 10^2$                                                          & \{(960, 29710)\}                                                                                                                                                               \\
                  & 1   & $ -20519\cdot 10^4$                                                        &$\emptyset$                                                                                                                                                                           \\
                   & 2   & $ -20519\cdot 10^6$                                                      &$\emptyset$  \\
\hline
\end{tabular}
\end{adjustbox}
\caption{Integral points data for \S \ref{elliptic} } \label{elliptic_table}
\end{table}

\begin{table}[H] \centering
\begin{adjustbox}{width=0.9\textwidth}
\renewcommand*{\arraystretch}{1.25}
\begin{tabular}{|lllp{10cm}|} \hline
$40\cdots04$      & 0   & $ 46656\cdot 10^2$                                                          & \{($-144$, 1296), ($-135$, 1485), (0, 2160), (160, 2960), (180, 3240),  (720, 19440), (864, 25488), (95760, 29633040)\}                                                             \\
                   & 1   & $ 46656\cdot 10^4$                                                        & \{(0, 21600)\}                                                                                                                                                                 \\
                   & 2   & $ 46656\cdot 10^6$                                                      & \{ ($-3600$, 0), (0, 216000), (7200, 648000)\}                                                                                                                                    \\ \hline
$42\cdots24$       & 0   & $ 23104\cdot 10^2$                                                          & \{($-76$, 1368), (0, 1520), (80, 1680), (1520, 59280)\}                                                                                                                          \\
                     & 1   & $ 23104\cdot 10^4$                                                        & \{(0, 15200)\}                                                                                                                                                                 \\
                    & 2   & $ 23104\cdot 10^6$                                                      & \{(0, 152000)\}                                                                                                                                                                \\ \hline
$442\cdots244$   & 0   & $ 31047184\cdot 10^4$                                                     & \{($-4975$, 432825), (0, 557200), (5600, 697200), (44576, 9427824)\}                                                                                                             \\
                    & 1   & $ 31047184\cdot 10^6$                                                   & \{(0, 5572000), (8959776, 26819194976)\}                                                                                                                                       \\
                      & 2   & $ 31047184 \cdot 10^8$                                                 & \{($-84000$, 50120000), (0, 55720000), (1671600, 2161936000)\}                                                                                                                   \\ \hline
$4443\cdots3444$  & 0   & $ 15928032996\cdot 10^6$                                                & \{(198400, 154070000)\}                                                                                                                                                        \\
                     & 1   & $ 15928032996\cdot 10^8$                                              & \{($-356000$, 1244060000)\}                                                                                                                                                 \\
                     & 2   & $ 15928032996\cdot 10^{10}$ &$\emptyset$                                                                                                                                                                      \\ \hline
$4447\cdots7444$    & 0   & $-48136123036\cdot 10^6$                                                 &$\emptyset$                                                                                                                                                                   \\
                      & 1   & $-48136123036\cdot 10^8$   &$\emptyset$                                                                                                                                                                   \\
                     & 2   & $-48136123036\cdot 10^{10}$ &$\emptyset$                                                                                                                                                                   \\ \hline
$52\cdots25$    & 0   & $  55225\cdot 10^2$                                                         & \{(0, 2350)\}                                                                                                                                                                  \\
                    & 1   & $ 55225\cdot 10^4$                                                        & \{(0, 23500)\}                                                                                                                                                                 \\
                   & 2   & $ 55225\cdot 10^6$                                                      & \{(0, 235000)\}                                                                                                                                                                \\ \hline
$65\cdots56$    & 0   & $  13924\cdot 10^2 $           & \{(0, 1180), (80, 1380), (944, 29028)\}                                                                                                                                        \\
                     & 1   & $ 13924\cdot 10^4 $            & \{(0, 11800)\}                                                                                                                                                                  \\
                      & 2   & $ 13924\cdot 10^6 $        & \{($-2400$, 10000), (0, 118000), (4425, 317125), (751296, 651203344)\}                                                                                                                 \\ \hline
$90\cdots09$    & 0   & $ 531441\cdot 10^2$                                                         & \{ ($-324$, 4374),  (0, 7290), (360, 9990), (405, 10935), (1620, 65610), (1944, 86022),  (215460, 100011510)\}                                                                      \\
                      & 1   & $ 531441\cdot 10^4 $        & \{(0, 72900)\}                                                                                                                                                                 \\
                    & 2   & $ 531441\cdot 10^6$         & \{($-8100$, 0), (0, 729000), (16200, 2187000)\}                                                                                                                                  \\ \hline
$94\cdots49$    & 0   & $ 296225\cdot 10^2$             & \{($-200$, 4650), ($-100$, 5350), (349, 8493), (10300, 1045350)\}                                                                                                                  \\
                    & 1   & $ 296225\cdot 10^4$                                                       & \{($-800$, 49500),  (200, 54500), (625, 56625), (11416, 1220964)\}                                                                                                                \\
                    & 2   & $ 296225\cdot 10^6 $        &$\emptyset$                                                                                                                                                                           \\ \hline
$98\cdots89$    & 0   & $  7921\cdot 10^2 $            & \{(0, 890)\}                                                                                                                                                                   \\
                   & 1   & $ 7921\cdot 10^4$                                                         & \{($-400$, 3900), (0, 8900), (1424, 54468)\}                                                                                                                                 \\
                  & 2   & $ 7921\cdot 10^6$            & \{(0, 89000), (8400, 775000)\}  \\ \hline                                                                                                                                       
\end{tabular}
\end{adjustbox}
\caption*{Table \ref{elliptic_table} (Continued): Integral points data for \S \ref{elliptic} }
\end{table}



\begin{thebibliography}{99}
    
    \bibitem{BL2015}
    M. A. Bennett and A. Levin,
    The Nagell--Ljunggren equation via Runge's method,
    \emph{Monatsh. Math.}
    {\bf 177} (2015), 15--31.
    
    \bibitem{BL2019}
    A. Bridy, R. J. Lemke Oliver, A. Shallit, and J. Shallit,
    The generalized Nagell--Ljunggren problem: powers with repetitive representations,
    \emph{Exp. Math.}
    {\bf{28}} (2019), 428--439.
    
    \bibitem{MAGM}
    W. Bosma, J. Cannon and C. Playoust,
    The Magma algebra system I: The user language,
    \emph{J. Symbolic Comput.}
    {\bf 24} (1997), 235--265.
    
    \bibitem{BM1999}
    Y. Bugeaud and M. Mignotte,
    On integers with identical digits,
    \emph{Mathematika}
    {\bf 46} (1999), 411--417.
    
    \bibitem{BM2007}
    Y. Bugeaud and P. Mih\u{a}ilescu,
    On the Nagell-Ljunggren equation $\frac{x^n-1}{x-1}=y^q$,
    \emph{Math. Scand.} 
    {\bf{101}} (2007), 177--183.
    
    \bibitem{GP2003}
    A. Gica and L. Panaitopol,
    On Obl\'ath's problem,
    \emph{J. Integer Sequences}
    {\bf 6} (2003), \href{https://cs.uwaterloo.ca/journals/JIS/VOL6/Panaitopol/panaitopol41.html}{Article 03.3.5}.
    
    \bibitem{GR2017}
    B. Goddard and J. Rouse,
    Sum of two repdigits a square,
    \emph{Integers}
    {\bf 17} (2017), Paper A24.
    
    \bibitem{Lj1943}
    W. Ljunggren,
    Noen setninger om ubestemte likninger av formen $(x^n-1)/(x-1)=y^q$,
    \emph{Norsk Mat. Tidsskr.}
    {\bf 25} (1943), 17--20.
    
    \bibitem{Na1920a}
    T. Nagell,
    Des \'{e}quations ind\'{e}termin\'{e}es $x^2 + x + 1 = y^n$ et $x^2 + x + 1 = 3y^n$,
    \emph{Norsk Mat. Forenings Skr.}
    {\bf 1} (1921).
    
    \bibitem{Na1920b}
    T. Nagell,
    Note sur l'\'{e}quation ind\'{e}termin\'{e}e $(x^n-1)/(x-1)=y^q$,
    \emph{Norsk Mat. Tidsskr.}
    {\bf 2} (1920), 75--78.
    
    \bibitem{Ob1956}
    R. Obl\'ath,
    Une propri\'et\'e des puissances parfaites,
    \emph{Mathesis}
    {\bf 65} (1956), 356--364.
    
    \bibitem{SAGE}
    The Sage Developers,
    SageMath, 
    The Sage Mathematics Software System (Version 9.0), 
    2020. Available at \url{https://www.sagemath.org}.
    
    \bibitem{Si2009}
    J. H. Silverman,
    \emph{The Arithmetic of Elliptic Curves},
    Springer, 2009.
    
    \bibitem{OEIS}
    N. J. A. Sloane et al.,
    The On-Line Encyclopedia of Integer Sequences, 2020.
    Available at \url{https://oeis.org}.
    
    \bibitem{St2010}
    I. Stewart,
    \emph{Professor Stewart's Hoard of Mathematical Treasures},
    Basic Books, 2010.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2010 \emph{Mathematics Subject Classification}:~Primary 11A63; Secondary  11A07, 11G05.

\noindent \emph{Keywords: } repdigit, palindromic number, square number, elliptic curve, integral point.

\bigskip
\hrule
\bigskip

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

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received October 11 2020; 
revised versions received  June 19 2021; June 20 2021.
Published in {\it Journal of Integer Sequences}, June 29 2021.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

