|
|
A054212
|
|
a(n)^5 is the smallest fifth power whose decimal digits occur with same frequency n.
|
|
3
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
2955^5 = 225313610074846875 and digits 0, 1, 2, 3, 4, 5, 6, 7, and 8 each occur twice.
|
|
PROG
|
(Python)
def agen(POW=5):
n = 1
while True:
k = 0
while True:
kpowstr = str(pow(k, POW))
q, r = divmod(len(kpowstr), n)
if r == 0:
ok = True
for d in set(kpowstr):
if kpowstr.count(d) != n:
ok = False; break
if ok: break
k += 1
else: # go to next multiple of n digits: (q+1)*n
k = max(k+1, int((10**((q+1)*n-1))**(1/POW)))
yield k
n += 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|