OFFSET
1,10
COMMENTS
In base 10, 1 and 4624 are the only numbers where a(n)=n (conjectured).
a(n) < n when n > 2.1*(10^10).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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]);
PROG
(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
(PARI) a(n) = my(d=digits(n)); vecsum(vector(#d, k, #d^d[k])); \\ Michel Marcus, Apr 27 2022
CROSSREFS
KEYWORD
AUTHOR
William Halpin, Apr 26 2022
STATUS
approved