OFFSET
1,1
EXAMPLE
a(8) = 8 +ds(7) +ds(9) = 7+8+9 = 24;
a(15) = 15+ds(14)+ds(16) = 15+5+7 = 27;
a(26) = 26+ds(25)+ds(27) = 26+7+9 = 42.
MATHEMATICA
Table[n+Total[IntegerDigits[n-1]]+Total[IntegerDigits[n+1]], {n, 70}] (* Harvey P. Dale, Jun 24 2011 *)
PROG
(Python)
def A160943(n): return n+sum(int(d) for d in str(n-1))+sum(int(d) for d in str(n+1)) # Chai Wah Wu, Mar 11 2021
(PARI) a(n) = n + sumdigits(n-1) + sumdigits(n+1); \\ Michel Marcus, Mar 11 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Claudio Meller, May 30 2009
STATUS
approved