# Find the five smallest positive integer $W$

Find the five smallest positive integer $W$ of at least two digits with the properties:

1. $W=\frac{(m)(m+1)}{2}$ for some integer $m$.
2. Every digit of $W$ is the same.

I was able to find two of the numbers $55,66$ but I did it with a calculator. I'm trying to find a strategy or a pattern but I can't seem to find any except that all the factors are prime.

• Dang this is harder than I think. 666 is another of them, but there's no other solutions within 9999999 – More water plz Oct 26 '15 at 5:16
• How were you able to find $666$ ? – sharonnicole116 Oct 26 '15 at 5:23
• looking at the prime factors of 111=3*37, you know that the only reasonable m to try is 36,37,73,74, etc. That's how I get 666. Now 1111=11*101 & 11111=41*271, using this idea we can show that no five or six digit W exist. Now when it goes up to 111111=3*7*11*13*37, things get more difficult and that's where I stopped – More water plz Oct 26 '15 at 5:42
• oeis.org/A045914 – Will Jagy Oct 26 '15 at 16:52
• there are only three that are two digits or more; to get five or six you need to include the single digit 1,3,6. In 1975 Ballew and Weger proved (see J. Rec. Math, Vol. 8, No. 2): 666 is the largest triangular number that's also a repdigit – Will Jagy Oct 26 '15 at 16:56

Here's a start. It's late, and I'm getting tired, so I'll stop wherever I run out of gas and/or ideas.

If all digits of $W$ are the same, then, if $w$ has $n$ digits, $W =k\frac{10^n-1}{9}$, where $k$ is the omni-present digit.

Therefore $k\frac{10^n-1}{9} =\frac{m(m+1)}{2}$.

Therefore $2k\frac{10^n-1}{9} =m(m+1)$.

Multiplying by $4$ to make the right side like a square, $8k\frac{10^n-1}{9} =4m(m+1) =(2m+1)^2-1$, so $(2m+1)^2 =8k\frac{10^n-1}{9}+1 =\frac{8k(10^n-1)+9}{9}$ or $8k(10^n-1)+9 =9(2m+1)^2$.

I'm floundering now, so I'll try the case $k=1$ and see what happens.

If $k=1$, then $9(2m+1)^2 =8(10^n-1)+9 =8\cdot 10^n+1$.

$n=1$ and $m=1$ works, but this just says $1=1$. Trying larger $n$ (up to 8) does not produce any squares.

Here's where I stop. Hope this helps someone else.

• oeis.org/A045914 – Will Jagy Oct 26 '15 at 16:52
• In 1975 Ballew and Weger proved (see J. Rec. Math, Vol. 8, No. 2): 666 is the largest triangular number that's also a repdigit – Will Jagy Oct 26 '15 at 16:56
• Ballew and Weger (J. Rec Math, Vol 8, No. 2, 1975) proved that the only triangular numbers that consist of one or more like digits are 1, 3, 6, 55, 66 and 666. The proof is only three pages long but involves tedious enumeration of cases so I won't try to summarize it here. – Will Jagy Oct 26 '15 at 17:01
• – Will Jagy Oct 26 '15 at 17:11
• here is a 1979 article by the same authors, fq.math.ca/Scanned/17-2/ballew.pdf – Will Jagy Oct 26 '15 at 18:16