%I #28 Feb 02 2024 20:08:53
%S 0,2955,49995,10365589,75418384,2592877410,100661113419,3989342709778,
%T 2826734132736,78074715540102
%N a(n)^5 is the smallest fifth power whose decimal digits occur with same frequency n.
%C Terms calculated by _Jeff Heleen_.
%C Next term > 2.5*10^17 - _Frank A. Stevenson_, Feb 02 2024
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/samedigits.htm">Numbers whose digits occur with same frequency</a>
%e 2955^5 = 225313610074846875 and digits 0, 1, 2, 3, 4, 5, 6, 7, and 8 each occur twice.
%o (Python)
%o def agen(POW=5):
%o n = 1
%o while True:
%o k = 0
%o while True:
%o kpowstr = str(pow(k, POW))
%o q, r = divmod(len(kpowstr), n)
%o if r == 0:
%o ok = True
%o for d in set(kpowstr):
%o if kpowstr.count(d) != n:
%o ok = False; break
%o if ok: break
%o k += 1
%o else: # go to next multiple of n digits: (q+1)*n
%o k = max(k+1, int((10**((q+1)*n-1))**(1/POW)))
%o yield k
%o n += 1
%o g = agen() # call with POW=4, 3, 2 for A052093, A052071, A052069
%o print([next(g) for n in range(1, 5)]) # _Michael S. Branicky_, Dec 17 2020
%Y Cf. A054213, A052093, A052094, A052069, A052071.
%K nonn,base,hard,more
%O 1,2
%A _Patrick De Geest_, Feb 15 2000
%E Offset corrected by _Michel Marcus_, Aug 12 2015
%E a(7)-a(8) from _Michael S. Branicky_, Dec 17 2020
%E a(9)-a(10) from _Frank A. Stevenson_, Jan 02 2024
|