cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A154532 #49 Mar 20 2023 19:23:11
%S A154532 9876543210,9994363488,9999257781,9999112926,9995722269,9999409158,
%T A154532 9998033316,9993870774,9986053188,9964052493,9975246786,9966918135,
%U A154532 9938689137,9998781633,9813743148,9970902252,9740383767,9829440591,9873773268,9985819785,9766102146,9863817738
%N 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.
%C A154532 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.
%C A154532 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
%H A154532 northwolves et al., <a href="https://bbs.emath.ac.cn/thread-1125-12-1.html">Ten Digit Numbers</a>
%H A154532 Zhining Yang, <a href="http://blog.csdn.net/northwolves/archive/2009/01/11/3753011.aspx">Largest Ten Digit Powers</a>
%e A154532 a(18) = 9829440591, so each digit (0-9) appears 18 times in the decimal expansion of 9829440591^18.
%o A154532 (Python)
%o A154532 def flag(p, n):
%o A154532     b = True
%o A154532     for i in range(10):
%o A154532         if not p.count(str(i)) == n:
%o A154532             b = False
%o A154532             break
%o A154532     return b
%o A154532 def a(n):
%o A154532     for i in range(10 ** 10 - 1, 3 * int(10 ** (10 - 1 / n) / 3), -3):
%o A154532         p = str(i ** n)
%o A154532         if flag(p, n) == True:
%o A154532             return i
%o A154532             break
%o A154532 for i in range(1, 23):
%o A154532     print(i, a(i))  # _Zhining Yang_, Oct 10 2022
%o A154532 (Python)
%o A154532 def flag(p, n):
%o A154532     return all(p.count(d) == n for d in "0123456789")
%o A154532 def a(n):
%o A154532     return next(i for i in range(10**10-1,3*int(10**(10-1/n)/3), -3) if flag(str(i**n), n))
%o A154532 for i in range(2, 23):
%o A154532     print(i,a(i))  # _Michael_S._Branicky_, Oct 10 2022
%Y A154532 Cf. A010784, A078255, A154566.
%K A154532 nonn,base
%O A154532 1,1
%A A154532 _Zhining Yang_, Jan 11 2009
%E A154532 Edited by _N. J. A. Sloane_, Jan 12 2009
%E A154532 a(19)-a(22) from _Zhining Yang_, Oct 05 2022
%E A154532 Definition revised by _N. J. A. Sloane_, Nov 22 2022