cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A219675 Starting with a(0)=0, a(n) = 1 + the sum of the digital sums of a(0) through a(n-1).

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 23, 28, 38, 49, 62, 70, 77, 91, 101, 103, 107, 115, 122, 127, 137, 148, 161, 169, 185, 199, 218, 229, 242, 250, 257, 271, 281, 292, 305, 313, 320, 325, 335, 346, 359, 376, 392, 406, 416, 427, 440, 448, 464, 478, 497, 517, 530, 538, 554, 568
Offset: 0

Views

Author

Bob Selcoe, Nov 17 2014

Keywords

Comments

Almost identical to A004207, only difference being a(0). - Yuval Filmus, Apr 22 2016.

Examples

			a(7) = 28 because (0+1+2+4+8+1+6+2+3) + 1 = 28.
		

Crossrefs

Cf. A004207 (essentially the same), A007953 (sum of digits), A244510 (related).

Programs

  • Mathematica
    a219675[n_Integer] := Module[{f}, f[0] = 0; f[k_] := 1 + Sum[Plus @@ IntegerDigits[f[i]], {i, 0, k - 1}]; f[n]]; a219675/@Range[40] (* Michael De Vlieger, Nov 17 2014 *)
  • PARI
    lista(nn) = {v = vector(nn); for (n=2, nn, v[n] = 1 + sum(k=1, n-1, sumdigits(v[k])););v;} \\ Michel Marcus, Nov 17 2014
    
  • PARI
    A219675_upto(n)=vector(n,i,n=if(i<3, i-1, n+sumdigits(n))) \\ M. F. Hasler, Oct 30 2024

Formula

a(n) = Sum_{k=0..n-1} digsum(a(k)) + 1.
a(n) = a(n-1) + digsum(a(n-1)).

Extensions

More terms from Michel Marcus, Nov 17 2014