A353138 Sum of (the number of digits in n to the power (each digit in n)).
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 5, 6, 8, 12, 20, 36, 68, 132, 260, 516, 9, 10, 12, 16, 24, 40, 72, 136, 264, 520, 17, 18, 20, 24, 32, 48, 80, 144, 272, 528, 33, 34, 36, 40, 48, 64, 96, 160, 288, 544, 65, 66, 68, 72, 80, 96
Offset: 1
Examples
a(3) = 1^3 = 1; a(164) = 3^1 + 3^6 + 3^4 = 813; a(4624) = 4^4 + 4^6 + 4^2 + 4^4 = 4624.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local m,L,t; L:= convert(n,base,10); m:= nops(L); add(m^t, t=L) end proc: map(f, [$1..100]);
-
PARI
a(n) = my(d=digits(n)); vecsum(vector(#d, k, #d^d[k])); \\ Michel Marcus, Apr 27 2022
-
Python
def a(n): s = str(n); return sum(len(s)**int(d) for d in s) print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Apr 26 2022
Comments