login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154566 Smallest 10-digit number whose n-th power contains each digit (0-9) n times. 7
1023456789, 3164252736, 4642110594, 5623720662, 6312942339, 6813614229, 7197035958, 7513755246, 7747685775, 7961085846, 8120306331, 8275283289, 8393900487, 8626922994, 8594070624, 8691229761, 8800389678, 8807854905 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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 n-th 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

Table of n, a(n) for n=1..18.

Zhining Yang, Smallest Ten Digit Powers

Zhining Yang, Largest Ten Digit Powers

EXAMPLE

For n=18,a(n)=8807854905. That means 8807854905^18 has all digits 0-9 each 18 times and 8807854905 is the smallest 10-digit number which has this property.

PROG

(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 * A217535 A180489 A204047

Adjacent sequences:  A154563 A154564 A154565 * A154567 A154568 A154569

KEYWORD

nonn,base,fini

AUTHOR

Zhining Yang, Jan 12 2009, Jan 13 2009

EXTENSIONS

Edited by N. J. A. Sloane, Jan 13 2009

Edited by Charles R Greathouse IV, Nov 01 2009

Further edits by M. F. Hasler, Oct 05 2012

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified July 27 04:52 EDT 2017. Contains 289841 sequences.