%I #22 Feb 24 2017 18:08:18
%S 1,594,746,986,1000000009
%N Integers that are equal to the sum of ascending numbers raised to their digits powers.
%H Harvey Heinz, <a href="http://www.magic-squares.net/narciss.htm">Narcissistic Numbers</a>
%e 594: 1^5 + 2^9 + 3^4 = 1 + 512 + 81 = 594.
%t A035138 = {}; Do[d = IntegerDigits[n]; If[Total[Range[Length[d]]^d] == n, AppendTo[A035138, n]], {n, 1000}]; A035138 (* _Jayanta Basu_ and _Giovanni Resta_, May 12 2013 *)
%o (PARI) isok(n) = my(d=digits(n)); sum(k=1, #d, k^d[k]) == n; \\ _Michel Marcus_, Feb 24 2017
%Y Cf. A032799.
%K nonn,fini,base,full
%O 1,2
%A _Patrick De Geest_, Nov 15 1998
|