OFFSET
0,4
COMMENTS
The third column is listed in A003321. - M. F. Hasler, Feb 16 2015
For a number x >= 10^(d-1) with d digits, the sum of n-th powers of these digits cannot exceed d*9^n. Therefore there is only a finite number of possible perfect digital invariants for any n, the largest of which has at most d* digits, where d* = 1+(n*log(9)+log d*)/log(10). - M. F. Hasler, Apr 14 2015
LINKS
Don Knuth, Table of a(n) for n=0..732
Don Knuth, CWEB program to generate solutions
EXAMPLE
The table starts:
1; (n = 0; 1 = 1^0.)
0, 1, 2, 3, 4, 5, 6, 7, 8, 9; (n = 1)
0, 1; (n = 2)
0, 1, 153, 370, 371, 407; (n = 3, A046197)
0, 1, 1634, 8208, 9474; (n = 4, A052455)
0, 1, 4150, 4151, 54748, 92727, 93084, 194979; (n = 5, A052464)
0, 1, 548834; (n = 6)
0, 1, 1741725, 4210818, 9800817, 9926315, 14459929; (n = 7, A124068)
0, 1, 24678050, 24678051, 88593477; (n = 8, A124069)
0, 1, 146511208, 472335975, 534494836, 912985153; (n = 9, A226970)
The third column corresponds to A003321.
The term 153 is member of the row n=3 because 153 = 1^3 + 5^3 + 3^3. - M. F. Hasler, Apr 14 2015
PROG
(PARI) row(n)={m=1; while(m*9^n>=10^m, m++); for(k=1, 10^m, sum(i=1, #d=digits(k), d[i]^n)==k && print1(k, ", "))}
for(n=0, 7, print1(row(n), ", "))
(Python)
from itertools import combinations_with_replacement
A252648_list = [1]
for m in range(1, 21):
l, L, dm, xlist, q = 1, 1, [d**m for d in range(10)], [0], 9**m
while l*q >= L:
for c in combinations_with_replacement(range(1, 10), l):
n = sum(dm[d] for d in c)
if sorted(int(d) for d in str(n)) == [0]*(len(str(n))-len(c))+list(c):
xlist.append(n)
l += 1
L *= 10
A252648_list.extend(sorted(xlist)) # Chai Wah Wu, Jan 04 2016
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Derek Orr, Dec 19 2014
EXTENSIONS
I added two links. - Don Knuth, Sep 10 2015
STATUS
approved