Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A154566
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
%I A154566
%S A154566 1023456789,3164252736,4642110594,5623720662,6312942339,6813614229,
%T A154566 7197035958,7513755246,7747685775,7961085846,8120306331,8275283289,
%U A154566 8393900487,8626922994,8594070624,8691229761,8800389678,8807854905
%N A154566 a(n) = smallest 10-digit number whose nth power contains each digit (0-9) 
               n times
%C A154566 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.
%C A154566 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!
%H A154566 Zhining Yang, <a href="http://blog.csdn.net/northwolves/archive/2009/
               01/11/3754517.aspx">Smallest Ten Digit Powers</a>
%H A154566 Zhining Yang, <a href="http://blog.csdn.net/northwolves/archive/2009/
               01/11/3753011.aspx">Largest Ten Digit Powers</a>
%e A154566 For n=18,a(n)=8807854905. That means 8807854905^18=1017800667051662368783465591302569308131110422993491216301\
               468058704671633879209985533097481348699745895354555660569488522254840792911262923775770734788733424097118\
               02829742431640625 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
%o A154566 (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
%o A154566 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
%o A154566 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
%Y A154566 Cf. A010784 A078255 A154532.
%Y A154566 Sequence in context: A050278 A051018 A020667 this_sequence A051264 A036745 
               A035124
%Y A154566 Adjacent sequences: A154563 A154564 A154565 this_sequence A154567 A154568 
               A154569
%K A154566 nonn,base
%O A154566 1,1
%A A154566 Zhining Yang (northwolves(AT)163.com), Jan 12 2009, Jan 13 2009
%E A154566 Edited by N. J. A. Sloane (njas(AT)research.att.com), Jan 13 2009
%E A154566 Edited by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Nov 
               01 2009

    
page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 5 23:38 EST 2009. Contains 170428 sequences.


AT&T Labs Research