%I #20 Dec 13 2024 11:00:05
%S 0,1,18,27,31,34,43,53,58,68
%N Numbers k such that the sum of digits of k^7 is equal to k.
%C Only the ten integers listed have this property.
%e a(3) = 18 because 18^7 = 612220032 and 6+1+2+2+2+0+0+3+2 = 18.
%t Select[Range[0, 100], #==Total[IntegerDigits[#^7]]&]
%o (Magma) [n: n in [0..80] | &+Intseq(n^7) eq n]; // _Vincenzo Librandi_, Feb 23 2015
%o (Sage) [n for n in (0..70) if sum((n^7).digits()) == n] # _Bruno Berselli_, Feb 23 2015
%o (PARI) isok(k)=sumdigits(k^7)==k \\ _Patrick De Geest_, Dec 13 2024
%Y Cf. A046459, A055575, A055576, A055577.
%Y Cf. A152147.
%K nonn,base,fini,full
%O 1,3
%A _Michel Lagneau_, Jun 24 2013