

A118137


Sum of decimal digits of two successive natural numbers.


1



1, 3, 5, 7, 9, 11, 13, 15, 17, 10, 3, 5, 7, 9, 11, 13, 15, 17, 19, 12, 5, 7, 9, 11, 13, 15, 17, 19, 21, 14, 7, 9, 11, 13, 15, 17, 19, 21, 23, 16, 9, 11, 13, 15, 17, 19, 21, 23, 25, 18, 11, 13, 15, 17, 19, 21, 23, 25, 27, 20, 13, 15, 17, 19, 21, 23, 25, 27, 29, 22, 15, 17, 19, 21, 23
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS



FORMULA



MAPLE

read("transforms") ;
digsum(n)+digsum(n+1) ;
# second Maple program:
a:= n> add(i, i=convert(parse(cat(n, n+1)), base, 10)):


MATHEMATICA

a[n_] := Total@ Flatten@ IntegerDigits[{n, n+1}]; Array[a, 80, 0] (* Giovanni Resta, Sep 06 2019 *)


PROG

(PARI) a(n) = sumdigits(n) + sumdigits(n+1); \\ Michel Marcus, Sep 06 2019


CROSSREFS



KEYWORD

base,easy,nonn


AUTHOR



EXTENSIONS



STATUS

approved



