OFFSET
0,11
COMMENTS
Leading zeros are ignored.
All terms belong to A061917.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
EXAMPLE
For n = 1021:
- abs(1-1) = 0,
- abs(0-2) = 2,
- abs(2-0) = 2,
- abs(1-1) = 0,
- so a(1021) = 220.
MAPLE
a:= n-> (l-> (h-> add(h[j]*10^(j-1), j=1..nops(h)))([seq(
abs(l[i]-l[-i]), i=1..nops(l))]))(convert(n, base, 10)):
seq(a(n), n=0..70); # Alois P. Heinz, Nov 12 2020
PROG
(PARI) a(n, base=10) = my (d=digits(n, base)); fromdigits(abs(d-Vecrev(d)), base)
CROSSREFS
KEYWORD
AUTHOR
Rémy Sigrist, Nov 11 2020
STATUS
approved