There are 3 known numbers that are repunits at least in four bases.
1. The title mentions one of them.
2. Please find the other two without referring to Google, OEIS et al.
3. Limit your search up to 9999.
4. Looking for the "fourth" would be exercise in futility.
Every number is a repunit in base 1, so we need to find only three more bases.
decimal bases
value (written in decimal)
31 2 5 30
8191 2 90 8190
The last base shown in each case is also trivial (that is, in addition to base 1) as every number is a repunit (with representation 11) in the base that is one lower than the integer itself.
The results were found by
DefDbl AZ
Dim crlf$, n(9999, 6)
Private Sub Form_Load()
Form1.Visible = True
Text1.Text = ""
crlf = Chr$(13) + Chr$(10)
For bs = 2 To 9999
tot = 1
bp = bs
Do
tot = tot + bp
If tot < 10000 Then
n(tot, 0) = n(tot, 0) + 1
n(tot, n(tot, 0)) = bs
End If
bp = bp * bs
DoEvents
Loop Until tot > 9999
Next
For i = 2 To 9999
If n(i, 0) >= 3 Then
Text1.Text = Text1.Text & i
For j = 1 To n(i, 0)
Text1.Text = Text1.Text & Str(n(i, j))
Next j
Text1.Text = Text1.Text & crlf
DoEvents
End If
Next i
Text1.Text = Text1.Text & crlf & " done"
End Sub

Posted by Charlie
on 20170325 14:51:18 