|
Search: id:A154566
|
|
|
| A154566 |
|
a(n) = smallest 10-digit number whose nth power contains each digit (0-9) n times |
|
+0 7
|
|
| 1023456789, 3164252736, 4642110594, 5623720662, 6312942339, 6813614229, 7197035958, 7513755246, 7747685775, 7961085846, 8120306331, 8275283289, 8393900487, 8626922994, 8594070624, 8691229761, 8800389678, 8807854905
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
A number with 10*n digits could contain all ten digits(0-9) n times. The probability of this is (10n)!/((n!)^10 * 10^((10*n)-10^(10*n-1)). There are 10^10-10^(10-1/n)) numbers which are nth powers of some 10-digit numbers. So there are about (10n)!*(10^10-10^(10-1/n)))/((n!)^10 * 10^((10*n)-10^(10*n-1)) numbers which satisfy the requirements.
Fortunately, I found a larger number than those shown here, for n=26, a(n)=9160395852. Since (10n)!*(10^10-10^(10-1/n))/((n!)^10 * 10^((10*n)-10^(10*n-1)) = 0.31691419..., this is a lucky event!
|
|
LINKS
|
Zhining Yang, Smallest Ten Digit Powers
Zhining Yang, Largest Ten Digit Powers
|
|
EXAMPLE
|
For n=18,a(n)=8807854905. That means 8807854905^18=101780066705166236878346559130256930813111042299349121630146805870467163387920998553309748134869974589535455566056948852225484079291126292377577073478873342409711802829742431640625 18th power of 8807854905 has all digit(0-9) each for 18 times and 8807854905 is the smallest 10-digit number which is satisified with all the rules
|
|
PROGRAM
|
(Visual Basic) Function befit(ByVal s As String, ByVal num As Long) As Boolean 'tell if a string s contain all digit(0-9) for just num times Dim b(9) As Long, t As Long befit = True 'init If Len(s) <> 10 * num Then befit = False: Exit Function For i = 1 To Len(s) t = Val(Mid(s, i, 1)) b(t) = b(t) + 1 If b(t) > num Then befit = False: Exit Function Next End Function
Function mypower(ByVal num As Currency, ByVal power As Long) As String 'UDF to calculate powers of a 10-digit number Dim b(), temp ReDim b(1 To 2 * power) ReDim s(1 To 2 * power) 'The last two element of the result, i.e. num it self b(2 * power - 1) = Val(Left(num, 5)) 'init b(2 * power) = Val(Right(num, 5)) 'init For i = 2 To power temp = 0 For j = 2 * power To 1 Step -1 temp = b(j) * num + temp b(j) = Format(Val(Right(temp, 5)), "00000") '100000 adic temp = Int(temp / 10 ^ 5) Next Next mypower = Join(b, "") 'The final result End Function
Private Sub Command1_Click() Dim index As Long, j As Currency, s As String Index = CLng(InputBox("Please enter an integer within 1-30", "Info", 2)) For j = 3*Int(10 ^ (10 - 1 / index)/3) To 9999999999# Step 3 'n times 0-9 must be divisible by 3 DoEvents s = mypower(j, index) 'the result If befit(s, index) Then 's contains 0-9 each for index times Open "c:\"& index &".txt" For Binary As #1 'Output to a text file Put #1, j & "^" & index & "=" & s 'Print the result Close #1 End If End Next End Sub
|
|
CROSSREFS
|
Cf. A010784 A078255 A154532.
Sequence in context: A050278 A051018 A020667 this_sequence A051264 A036745 A035124
Adjacent sequences: A154563 A154564 A154565 this_sequence A154567 A154568 A154569
|
|
KEYWORD
|
nonn,base,new
|
|
AUTHOR
|
Zhining Yang (northwolves(AT)163.com), Jan 12 2009, Jan 13 2009
|
|
EXTENSIONS
|
Edited by N. J. A. Sloane (njas(AT)research.att.com), Jan 13 2009
Edited by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Nov 01 2009
|
|
|
Search completed in 0.002 seconds
|