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
northwolves et al., Ten Digit Numbers
Zhining Yang, Largest Ten Digit Powers
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):
print(i, a(i)) # Zhining Yang, Oct 10 2022
(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
Zhining Yang, Jan 11 2009
EXTENSIONS
Edited by N. J. A. Sloane, Jan 12 2009
a(19)-a(22) from Zhining Yang, Oct 05 2022
Definition revised by N. J. A. Sloane, Nov 22 2022
STATUS
approved