A357755 Number of solutions for a 10-digit number whose n-th power contains each digit (0-9) exactly n times.
3265920, 468372, 65663, 15487, 5020, 1930, 855, 417, 246, 114, 97, 45, 33, 24, 20, 18, 7, 6, 1, 3, 2, 3, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1
Offset: 1
Examples
a(20) = 3 because there are 3 10-digit numbers (8951993472, 9921107394, and 9985819785) whose 20th power contains each digit (0-9) 20 times.
Programs
-
Python
def flag(p, n): return all(p.count(d) == n for d in "0123456789") def a(n): num=0 for i in range(10**10-1, 3*int(10**(10-1/n)/3), -3): if flag(str(i**n), n): num+=1 return(num)
Comments