%I #39 Feb 04 2019 07:28:45
%S 1,10,2,6,5,8,3,7,5,6,3,10,2,3,3,2,4,6,2,6,3,4,2,7,5,10,2,9,2,9,2,6,3,
%T 5,3,6,3,5,5,7,2,2,4,9,6,9,5,7,2,3,2,4,2,3,6,4,5,4,2,4,4,4,3,7,3,6,3,
%U 4,3,3,4,3,4,5,3,4,5,5,3,3,2,3,2,4,3,8,3,5,2,7,3
%N Number of perfect digital invariants of order n, i.e., numbers equal to the sum of n-th powers of their digits.
%C Row lengths of the table A252648.
%C For a number with d digits, the sum of n-th powers cannot exceed d*9^n, but the number is not less than 10^(d-1). 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).
%H Don Knuth, <a href="/A255668/b255668.txt">Table of n, a(n) for n = 0..172</a>
%H <a href="http://www-cs-faculty.stanford.edu/~knuth/perfect_digital_invariants-sols.txt">Table of a(n) for n=0..172</a> [From _Don Knuth_, Sep 09 2015]
%F a(n) >= 2 for all n > 0, since 0 and 1 are digital invariants for any power n > 0.
%e a(0)=1 because 1 is the only number equal to the sum of 0th powers of its digits.
%e a(1)=10 because { 0, 1, ... 9 } are the only numbers equal to the sum of their digits (taken to the power 1).
%e a(2)=2 because 0 and 1 are the only numbers equal to the sum of the squares of their digits.
%e a(3)=6 because { 0, 1, 153, 370, 371, 407 } is the set of all numbers equal to the sum of the 3rd powers of their digits, cf. A046197.
%e For more examples, see the table A252648.
%t Reap@ For[n = 0, n < 6, n++, Sow@ Length@ Select[Range[0, 10^(n + 1)], Plus @@ (IntegerDigits[#]^n) == # &]] // Flatten // Rest (* _Michael De Vlieger_, Apr 14 2015 *)
%Y Cf. A252648, A003321, A046197, A052455, A052464, A124068, A124069, A226970.
%K nonn,base
%O 0,2
%A _M. F. Hasler_, Apr 14 2015
%E a(10)-a(90) from _Don Knuth_, Sep 09 2015