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.

Showing 1-4 of 4 results.

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

A248893 a(0)=0; for n>0, choose a(n) to be the smallest number > a(n-1) such that the condition a(n) > Sum_{k=0..n} (number of 1's in binary expansion of n a(k)) holds.

Original entry on oeis.org

0, 2, 4, 5, 8, 9, 10, 12, 16, 17, 18, 20, 22, 24, 28, 32, 33, 34, 35, 38, 40, 44, 48, 49, 52, 56, 58, 64, 65, 66, 67, 68, 72, 73, 76, 80, 81, 84, 88, 92, 96, 97, 100, 104, 106, 112, 113, 118, 124, 128, 129, 130, 131, 134, 136, 140, 144, 145, 148, 152, 154, 160
Offset: 0

Views

Author

Lars Blomberg, Mar 06 2015

Keywords

Comments

See A244510 for a decimal version.

Examples

			a(7)=12 because the sum of 1's in the binary expansions of a(0)..a(6) is 9, and 12 is the smallest number greater than a(6)=10 and also greater than 9 + sum of 1's in the binary expansion of 12 (which is 2).
		

Crossrefs

A247083 a(n) = 0 for n <= 0: Starting with n=1, a(n) = 1 + the sum of the digital sums of a(0) through a(n-3).

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 4, 6, 9, 13, 19, 28, 32, 42, 52, 57, 63, 70, 82, 91, 98, 108, 118, 135, 144, 154, 163, 172, 182, 192, 202, 213, 225, 229, 235, 244, 257, 267, 277, 291, 306, 322, 334, 343, 350, 360, 370, 378, 387, 397, 415, 433, 452, 462, 472, 483, 495, 508, 523, 541, 554, 564, 574
Offset: 0

Views

Author

Bob Selcoe, Nov 17 2014

Keywords

Examples

			a(10) = 28 because (0+1+1+2+3+5+8+1+3+2+1) + 1 = 28.
		

Crossrefs

Programs

  • Maple
    A247083 := proc(n)
        option remember;
        if n <= 0 then
            0;
        else
            1+add(digsum(procname(i)),i=0..n-3) ;
        end if;
    end proc: # R. J. Mathar, Dec 02 2014
  • Mathematica
    a247083[n_Integer] := Module[{t = Table[1, {i, n + 1}], j, k},
    t[[1]] = 0; j = 5; While[j <= Length[t], t[[j]] = Sum[Plus @@ IntegerDigits[t[[k]]], {k, 1, j - 3}]; j++]; Drop[t, {2}]]; a247083[63] (* Michael De Vlieger, Nov 26 2014 *)
  • PARI
    v=[0];n=1;while(n<100,s=0;for(i=1,#v-2,s+=sumdigits(v[i]));v=concat(v,1+s);n++);v \\ Derek Orr, Nov 26 2014
  • Sage
    n=100
    a=[0,1,1]
    for i in [3..n]:
        a.append(1+sum(sum(a[j].digits()) for j in [1..(i-3)]))
    a # Tom Edgar, Nov 25 2014
    

Formula

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

A247084 a(n)=0 when n<=0: Starting with n=1, a(n) = 1 + the sum of the digital sums of a(0) through a(n-4).

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 19, 26, 27, 32, 42, 50, 59, 64, 70, 75, 89, 99, 106, 118, 135, 153, 160, 170, 179, 188, 195, 203, 220, 237, 252, 257, 261, 273, 282, 296, 305, 317, 329, 346, 354, 365, 379, 392, 404, 418, 437, 451, 459, 472, 486, 496, 514
Offset: 0

Views

Author

Bob Selcoe, Nov 17 2014

Keywords

Examples

			a(15) = 32 because (0+1+1+1+1+2+3+4+5+7+1+0+1+4) + 1 = 32.
		

Crossrefs

Cf. A007953, A219675, A244510 (related).

Programs

  • Mathematica
    a247084[n_Integer] := Module[{t = Table[1, {i, n + 1}], j, k},
    t[[1]] = 0; j = 6; While[j <= Length[t], t[[j]] = Sum[Plus @@ IntegerDigits[t[[k]]], {k, 1, j - 4}]; ++]; Drop[t, {2}]]; a247084[59] (* Michael De Vlieger, Nov 29 2014 *)
  • PARI
    lista(nn) = {v = vector(nn); for (n=2, nn, v[n] = 1 + sum(i=1, n-4, if (n-4 > 0, sumdigits(v[i])));); v;} \\ Michel Marcus, Nov 18 2014

Formula

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

Extensions

More terms from Michel Marcus, Nov 18 2014
Showing 1-4 of 4 results.