OFFSET
0,2
MAPLE
a:= n-> (l-> add(i, i=l)+parse(cat(l[])))(convert(n, base, 10)):
seq(a(n), n=0..100); # Alois P. Heinz, Jan 09 2021
MATHEMATICA
a[n_] := IntegerReverse[n] + Plus @@ IntegerDigits[n]; Array[a, 100, 0] (* Amiram Eldar, Jan 09 2021 *)
PROG
(PARI) a(n) = my(d=digits(n)); fromdigits(Vecrev(d)) + vecsum(d);
(Python)
def A340479(n):
s = str(n)
return int(s[::-1]) + sum(int(d) for d in s) # Chai Wah Wu, Jan 09 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Jan 09 2021
STATUS
approved