All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
1 is one of them (Posted on 2017-03-25) Difficulty: 4 of 5
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.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 2
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 A-Z
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 2017-03-25 14:51:18
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information