%I #85 Feb 09 2024 10:08:56
%S 0,1,2,3,4,5,6,7,8,9,153,370,371,407,1634,4150,4151,8208,9474,54748,
%T 92727,93084,194979,548834,1741725,4210818,9800817,9926315,14459929,
%U 24678050,24678051,88593477,146511208,472335975,534494836,912985153
%N Perfect Digital Invariants: numbers that are the sum of some fixed power of their digits.
%C The old name was "Powerful numbers, definition (3)". Cf. A001694, A007532. - _N. J. A. Sloane_, Jan 16 2022.
%C Randle has suggested that these numbers be called "powerful", but this usually refers to a distinct property related to prime factorization, cf. A001694, A036966, A005934.
%C Numbers m such that m = Sum_{i=1..k} d(i)^s for some s, where d(1..k) are the decimal digits of m.
%C Superset of A005188 (Plusperfect, narcissistic or Armstrong numbers: s=k), A046197 (s=3), A052455 (s=4), A052464 (s=5), A124068 (s=6, 7), A124069 (s=8). - _R. J. Mathar_, Jun 15 2009, Jun 22 2009
%H Jerome Raulin, <a href="/A023052/b023052.txt">Table of n, a(n) for n = 1..345</a> (terms 1..255 from Joseph Myers)
%H Encyclopaedia Britannica, <a href="https://www.britannica.com/science/perfect-digital-invariant">Perfect digital invariant</a>, article "Number patterns and curiosities" online since July 26, 1999, revised Aug 25, 2000.
%H Hans Havermann, <a href="/A023052/a023052.txt">Extended table of values for A023052 and A046074</a>
%H Donald E. Knuth, The Art of Computer Programming, Volume 4, Pre-Fascicle 9B <a href="https://www-cs-faculty.stanford.edu/~knuth/fasc9b.ps.gz">A Potpourri of Puzzles</a>
%H J. Randle, <a href="http://www.jstor.org/stable/3611861">Powerful numbers</a>, Note 3208, Math. Gaz. 52 (1968), 383.
%H J. Randle, <a href="/A000255/a000255.pdf">Powerful numbers</a>, Note 3208, Math. Gaz. 52 (1968), 383. [Annotated scanned copy]
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/NarcissisticNumber.html">Narcissistic Number</a>
%H <a href="/index/Pow#powerful">Index entries for sequences related to powerful numbers</a>
%e 153 = 1^3 + 5^3 + 3^3, 4210818 = 4^7 + 2^7 + 1^7 + 0^7 + 8^7 + 1^7 + 8^7.
%t Select[Range[0, 10^5], Function[m, AnyTrue[Function[k, Total@ Map[Power[#, k] &, IntegerDigits@ m]] /@ Range@ 10, # == m &]]] (* _Michael De Vlieger_, Feb 08 2016, Version 10 *)
%o (PARI) is(n)=if(n<10, return(1)); my(d=digits(n),m=vecmax(d)); if(m<2, return(0)); for(k=3,logint(n,m), if(sum(i=1,#d,d[i]^k)==n, return(1))); 0 \\ _Charles R Greathouse IV_, Feb 06 2017
%o (PARI) select( is_A023052(n,b=10)={n<b|| forstep(p=logint(n, max(vecmax(b=digits(n, b)),2)), 2, -1, my(t=vecsum([d^p|d<-b])); t>n|| return(t==n))}, [0..10^5]) \\ _M. F. Hasler_, Nov 21 2019
%Y Cf. A001694 (powerful numbers: p|n => p^2|n), A005934 (highly powerful numbers).
%Y Cf. A003321, A007532, A014576, A046074, A046761, A053540, A161752.
%Y Cf. A005188 (here the power must be equal to the number of digits).
%Y In other bases: A162216 (base 3), A162219 (base 4), A162222 (base 5), A162225 (base 6), A162228 (base 7), A162231 (base 8), A162234 (base 9).
%K nonn,base,nice
%O 1,3
%A _David W. Wilson_
%E Computed to 10^50 by G. N. Gusev (GGN(AT)rm.yaroslavl.ru)
%E Computed to 10^74 by Xiaoqing Tang
%E A-number typo corrected by _R. J. Mathar_, Jun 22 2009
%E Computed to 10^105 by _Joseph Myers_
%E Cross-references edited by _Joseph Myers_, Jun 28 2009
%E Edited by _M. F. Hasler_, Nov 21 2019