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

 10 4 7 10 (Posted on 2015-11-03)
Consider decimal number 33. If converted to base 4 form it would be 201, which if regarded as 7 base number would yield 99 decimal.
Pay attention: 99=3*33.
219 is another number displaying the same feature (when converted to base 4 and interpreted as base 7 creates a multiple of the original decimal number).

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions Comment 2 of 2 |
`                           base 7        multiple  base         base    interpretation       of   10            4       in base 10      original      1             1           1             1      2             2           2             1      3             3           3             1     33           201          99             3    219          3123        1095             5    840         31020        7560             9   1055        100133       16880            16   4220       1001330      118160            28  16880      10013300      827120            49  95322     113101122     6958506            73 178500     223211010    13566000            76 714000    2232110100    94962000           133 981540    3233220210   135452520           1381387680   11102302200   328880160           237`

DefDbl A-Z
Dim crlf\$

Form1.Visible = True

Text1.Text = ""
crlf = Chr\$(13) + Chr\$(10)

For n = 1 To 5000000
DoEvents
b4\$ = base\$(n, 4)
b7 = fromBase(b4\$, 7)
If b7 Mod n = 0 Then
Text1.Text = Text1.Text & mform(n, "######0") & "  " & pad(b4, 12) & mform(b7, "###########0") & mform(b7 / n, "####0") & crlf
End If
Next

Text1.Text = Text1.Text & crlf & " done"

End Sub

Function base\$(n, b)
v\$ = ""
n2 = n
Do
d = n2 Mod b
n2 = n2 \ b
v\$ = Mid("0123456789abcdefghijklmnopqrstuvwxyz", d + 1, 1) + v\$
Loop Until n2 = 0
base\$ = v\$
End Function

Function fromBase(n\$, b)
v = 0
For i = 1 To Len(n\$)
c\$ = LCase\$(Mid(n\$, i, 1))
If c\$ > " " Then
v = v * b + InStr("0123456789abcdefghijklmnopqrstuvwxyz", c\$) - 1
End If
Next
fromBase = v
End Function

Function mform\$(x, t\$)
a\$ = Format\$(x, t\$)
If Len(a\$) < Len(t\$) Then a\$ = Space\$(Len(t\$) - Len(a\$)) & a\$
mform\$ = a\$
End Function

st\$ = n
If Len(st) < l Then st = Right(String(l, " ") + st, l)
End Function

 Posted by Charlie on 2015-11-03 14:31:07

 Search: Search body:
Forums (0)