A255668 Number of perfect digital invariants of order n, i.e., numbers equal to the sum of n-th powers of their digits.
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, 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, 4, 3, 3, 4, 3, 4, 5, 3, 4, 5, 5, 3, 3, 2, 3, 2, 4, 3, 8, 3, 5, 2, 7, 3
Offset: 0
Examples
a(0)=1 because 1 is the only number equal to the sum of 0th powers of its digits. a(1)=10 because { 0, 1, ... 9 } are the only numbers equal to the sum of their digits (taken to the power 1). a(2)=2 because 0 and 1 are the only numbers equal to the sum of the squares of their digits. 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. For more examples, see the table A252648.
Links
- Don Knuth, Table of n, a(n) for n = 0..172
- Table of a(n) for n=0..172 [From _Don Knuth_, Sep 09 2015]
Programs
-
Mathematica
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 *)
Formula
a(n) >= 2 for all n > 0, since 0 and 1 are digital invariants for any power n > 0.
Extensions
a(10)-a(90) from Don Knuth, Sep 09 2015
Comments