A075543 a(n) = a(n-1) + digit sum(n + 2) with a(0) = 2.
2, 5, 9, 14, 20, 27, 35, 44, 45, 47, 50, 54, 59, 65, 72, 80, 89, 99, 101, 104, 108, 113, 119, 126, 134, 143, 153, 164, 167, 171, 176, 182, 189, 197, 206, 216, 227, 239, 243, 248, 254, 261, 269, 278, 288, 299, 311, 324, 329, 335, 342, 350, 359, 369, 380, 392
Offset: 0
Examples
a(1) = a(0) + digit sum(1 + 2) = 2 + 3 = 5.
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000
Programs
-
Mathematica
Block[{k = 2}, NestList[# + DigitSum[++k] &, 2, 100]] (* Paolo Xausa, May 24 2024 *)
-
PARI
c=0; for (n=2,100,c=c+sumdigits(n); print1(c,","))
Extensions
Definition corrected by Georg Fischer, May 22 2024
Comments