OFFSET
0,2
COMMENTS
Difference between two consecutive terms is never greater than 2. Difference is less than zero when n is a multiple of 10.
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
EXAMPLE
a(12) = 17 because n=12, sum of digits of n is 3, number of digits of n is 2, therefore 12 + 3 + 2 = 17.
MAPLE
f:= proc(n) local L;
L:= convert(n, base, 10);
n + nops(L) + convert(L, `+`)
end proc:
map(f, [$0..100]); # Robert Israel, Mar 04 2022
PROG
(PARI) a(n) = n + sumdigits(n) + if (n==0, 1, #digits(n)); \\ Michel Marcus, Apr 23 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Carmine Suriano, Apr 13 2014
STATUS
approved