login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A045503
If decimal expansion of n is ab...d, a(n) = a^a + b^b +...+ d^d.
17
1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 2, 2, 5, 28, 257, 3126, 46657, 823544, 16777217, 387420490, 5, 5, 8, 31, 260, 3129, 46660, 823547, 16777220, 387420493, 28, 28, 31, 54, 283, 3152, 46683, 823570, 16777243, 387420516, 257, 257, 260
OFFSET
0,3
LINKS
MAPLE
a:= n-> add(i^i, i=convert(n, base, 10)):
seq(a(n), n=0..42); # Alois P. Heinz, Apr 29 2022
MATHEMATICA
f[n_]:=Module[{idn=IntegerDigits[n]/.{0->1}}, Total[idn^idn]]; Array[f, 100, 0] (* Harvey P. Dale, May 14 2012 *)
PROG
(PARI) a(n)=if(n, n=digits(n); sum(i=1, #n, n[i]^n[i]), 1) \\ Charles R Greathouse IV, Oct 07 2015
(PARI) apply( {A045503(n)=vecsum([d^d|d<-digits(n+!n)])}, [0..44]) \\ M. F. Hasler, Oct 01 2024
CROSSREFS
Cf. A045512 (excludes zero digits).
Sequence in context: A067041 A070691 A070834 * A134010 A117280 A067040
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Checked by Neven Juric (neven.juric(AT)apis-it.hr), Feb 04 2008
STATUS
approved