|
|
A154532
|
|
a(n) is the largest 10-digit number whose n-th power contains each digit (0-9) n times, or -1 no such number exists.
|
|
9
|
|
|
9876543210, 9994363488, 9999257781, 9999112926, 9995722269, 9999409158, 9998033316, 9993870774, 9986053188, 9964052493, 9975246786, 9966918135, 9938689137, 9998781633, 9813743148, 9970902252, 9740383767, 9829440591, 9873773268, 9985819785, 9766102146, 9863817738
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
A number with 10*n digits may have all ten digits (0-9) repeated 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 10-digit numbers. So there may exist Count=(10n)!*(10^10-10^(10-1/n)))/((n!)^10 * 10^((10*n)-10^(2*n-1)) numbers with the desired property.
From a(23) to a(110) the only terms which exist are a(24)=9793730157, a(26)=9347769564, a(35)=9959167017, and a(38)=9501874278. (The other values of a(n) are -1.) - Zhining Yang, Oct 05 2022
|
|
LINKS
|
|
|
EXAMPLE
|
a(18) = 9829440591, so each digit (0-9) appears 18 times in the decimal expansion of 9829440591^18.
|
|
PROG
|
(Python)
def flag(p, n):
b = True
for i in range(10):
if not p.count(str(i)) == n:
b = False
break
return b
def a(n):
for i in range(10 ** 10 - 1, 3 * int(10 ** (10 - 1 / n) / 3), -3):
p = str(i ** n)
if flag(p, n) == True:
return i
break
for i in range(1, 23):
(Python)
def flag(p, n):
return all(p.count(d) == n for d in "0123456789")
def a(n):
return next(i for i in range(10**10-1, 3*int(10**(10-1/n)/3), -3) if flag(str(i**n), n))
for i in range(2, 23):
print(i, a(i)) # _Michael_S._Branicky_, Oct 10 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|