3
$\begingroup$

I would like to know whether $55$, $66$ and $666$ are the only triangular numbers that are repdigits, i.e., numbers at least $10$ whose digits w.r.t. base 10 all agree.

In more sophisticated terms, I am asking about solutions of the equation $$\frac{n(n+1)}{2} = \frac{d}{9}(10^k-1)$$ where $k \geq 2$ and $n$ are positive integers and $d \in \{1,2, \dots, 9\}$.

Here are some quick ideas:

Considering the remainder of triangular numbers modulo 100 yields that this can only work for $d \in \{1,5,6\}$. I only looked into the case $d = 5$ in greater detail. Then, the equation above can be rephrased as $$(6n+3)^2 = 4\cdot10^{k+1}-31.$$ If $k$ is odd, there are no solutions as $31$ is no difference of two squares. (Alternatively, use that the RHS is $\equiv 6 \ (\text{mod. } 11)$, but $6$ is a quadratic nonresidue of $11$.)

For $k$ even, we would like to find all solutions to the Pell-like equation $$x^2 - 10y^2 = -31$$ where $y$ is twice a power of $10$. Two such solutions are given by $(x_0,y_0) = (3,2)$ and $(x_0', y_0') = (63,20)$. The theory of Pell's equation yields that all solutions of this equation are given by $$\begin{pmatrix}19 & 60 \\ 6 & 19\end{pmatrix}^m \ \textbf{v}$$ where $m \geq 0$ and $\textbf{v} = (x_0, y_0)^{T}$ or $\textbf{v} = (x_0', y_0')^{T}$. But does this really help to prove that none of these has the property that the second component is twice a power of ten unless $m=0$?

$\endgroup$
8
  • 8
    $\begingroup$ Instead of thinking about Pell equations, it makes more sense to think of $10^{k+1}$ as either $y^3$, $10 y^3$, or $100 y^3$, and then one has a Thue equation for which there are effective methods for finding all solutions. Mike Bennett can solve these in his sleep. $\endgroup$
    – user523984
    Commented Mar 20 at 19:27
  • $\begingroup$ A proof that only $55$, $66$, and $666$ qualify is offered for inspection at proofwiki.org/wiki/Repdigit_Triangular_Numbers – more formal publications are David W. Ballew and Ronald C. Weger, Triangular Numbers with Repeated Digits, Proc. S. D. Acad. Sci., Vol. 51 (1972), pp. 52-55; David W. Ballew and Ronald C. Weger, Repdigit triangular numbers, J. Rec. Math., Vol. 8, No. 2 (1975-76), pp. 96-98. $\endgroup$ Commented Mar 21 at 6:17
  • 1
    $\begingroup$ I do not believe these "proofs" are correct. For the digit $5$, they try to argue that no square ends in $4\dots 41$ for sufficiently many fours, but any number $\equiv 1 (8)$ is a quadratic residue modulo any power of $2$, and any number $\equiv 1 (5)$ is a quadratic residue modulo any power of $5$. Thus there are square numbers ending in $4\dots 41$ with arbitrarily many fours. $\endgroup$ Commented Mar 21 at 17:23
  • $\begingroup$ E.g., $32021^2=1025344441$. $\endgroup$ Commented Mar 21 at 23:53
  • $\begingroup$ Yes, that's a big hole in those arguments. By the way, had you included @Gerry in your comment, then I would have been notified of it. $\endgroup$ Commented Mar 22 at 0:01

1 Answer 1

3
$\begingroup$

Following user523984's suggestion in the comments:

From triangle = repdigit $$\frac{k(k+1)}2 = \frac{d(10^j-1)}9$$ we get $$k = \frac{-1 \pm \frac13 \sqrt{9 + 8d(10^j-1)}}{2}$$ so we require $9 + 8d(10^j-1) = y^2$.

Case-splitting on $j = 3m + i$ we get $y^2 = 8d \cdot 10^i (10^m)^3 + (9 - 8d)$. Substitute $x = 10^m$, $c = 8d \cdot 10^i$ and put into Weierstrass form as $y'^2 = x'^3 + (9 - 8d)c^2$ with $y' = cy$, $x' = cx$. Then we can ask a CAS to find integral points and filter to relevant ones.

For example, in Sage:

# Elliptic curves to solve the triangular repdigit problem
for d in range(1, 10):
    for i in range(3):
        c = 8 * d * 10^i
        ec = EllipticCurve([0, 0, 0, 0, (9 - 8*d)*c^2])
        for xprime, yprime, _ in ec.integral_points():
            if xprime % c == 0 and yprime % c == 0:
                x, y = xprime // c, yprime // c
                # We require x to be a power of 10
                if x == 0:
                    continue

                m = int(log(x) / log(10) + 0.5)
                if x == 10^m:
                    k = (abs(y) / 3 - 1) / 2
                    rep = d * (10^(3*m+i) - 1) / 9
                    if rep > 0:
                        print(k, rep)

print("Search complete")

Run this online at sagecell.sagemath.org

It turns out that Ballew and Weger's result is correct, even though their argument does appear to have some calculation errors (including, but not limited to, an apparent belief that $0$ cannot be a digit in $y$).

$\endgroup$
1
  • $\begingroup$ Btw, "power of 10" can be tested without floating point arithmetic (computing log's etc.) via x == 10^valuation(x,10). $\endgroup$ Commented Mar 24 at 3:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .