%I #59 Sep 08 2022 08:45:16
%S 1,2,3,4,5,6,7,8,9,1,2,5,10,17,26,37,50,65,82,4,5,8,13,20,29,40,53,68,
%T 85,9,10,13,18,25,34,45,58,73,90,16,17,20,25,32,41,52,65,80,97,25,26,
%U 29,34,41,50,61,74,89,106,36,37,40,45,52,61,72,85,100,117,49,50,53,58,65
%N Sum of (each digit of n raised to the power (number of digits in n)).
%C Sometimes referred to as "narcissistic function" (in base 10). Fixed points are the narcissistic (or Armstrong, or plus perfect) numbers A005188. - _M. F. Hasler_, Nov 17 2019
%H Michael De Vlieger, <a href="/A101337/b101337.txt">Table of n, a(n) for n = 1..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Narcissistic_number">Narcissistic number</a>, as of Nov 18 2019.
%F a(n) <= A055642(n)*9^A055642(n) with equality for all n = 10^k - 1. Write n = 10^x to get a(n) < n when 1+log_10(x+1) < (x+1)(1-log_10(9)) <=> x > 59.85. It appears that a(n) < n already for all n > 1.02*10^59. - _M. F. Hasler_, Nov 17 2019
%e a(75) = 7^2 + 5^2 = 74 and a(705) = 7^3 + 0^3 + 5^3 = 468.
%e a(1.02e59 - 1) = 102429587095122578993551250282047487264694110769657513064859 ~ 1.024e59 is an example of n close to the limit beyond which a(n) < n for all n. - _M. F. Hasler_, Nov 17 2019
%t Array[Total[IntegerDigits[#]^IntegerLength[#]]&,80] (* _Harvey P. Dale_, Aug 27 2011 *)
%o (PARI) a(n)=my(d=digits(n)); sum(i=1,#d, d[i]^#d) \\ _Charles R Greathouse IV_, Aug 10 2017
%o (PARI) apply( A101337(n)=vecsum([d^#n|d<-n=digits(n)]), [0..99]) \\ _M. F. Hasler_, Nov 17 2019
%o (Python)
%o def A101337(n):
%o s = str(n)
%o l = len(s)
%o return sum(int(d)**l for d in s) # _Chai Wah Wu_, Feb 26 2019
%o (Magma) f:=func<n|&+[Intseq(n)[i]^#Intseq(n):i in [1..#Intseq(n)]]>; [f(n):n in [1..75]]; // _Marius A. Burtea_, Nov 18 2019
%Y Cf. A055642, A179239, A306360.
%K base,easy,nonn
%O 1,2
%A _Gordon Hamilton_, Dec 24 2004
%E Name changed by _Axel Harvey_, Dec 26 2011
%E Edited by _M. F. Hasler_, Nov 17 2019