

A240848


Sum of n, digitsum(n) and number of digits of n.


1



1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 68, 70, 72, 74, 76, 78
(list;
graph;
refs;
listen;
history;
text;
internal format)



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



FORMULA



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:


PROG

(PARI) a(n) = n + sumdigits(n) + if (n==0, 1, #digits(n)); \\ Michel Marcus, Apr 23 2014


CROSSREFS



KEYWORD

nonn,base


AUTHOR



STATUS

approved



