login
A340479
a(n) = R(n) + digsum(n).
1
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 2, 13, 24, 35, 46, 57, 68, 79, 90, 101, 4, 15, 26, 37, 48, 59, 70, 81, 92, 103, 6, 17, 28, 39, 50, 61, 72, 83, 94, 105, 8, 19, 30, 41, 52, 63, 74, 85, 96, 107, 10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 12, 23, 34, 45, 56, 67, 78, 89
OFFSET
0,2
FORMULA
a(n) = A004086(n) + A007953(n).
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
Sequence in context: A245627 A097586 A169805 * A263042 A230099 A098727
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Jan 09 2021
STATUS
approved