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.

A343799 Total sum of the elements in all nondecreasing sequences s1, s2, ..., s_n of powers of 2 such that s_i <= 1 + Sum_{j=1..i-1} s_j.

Original entry on oeis.org

0, 1, 5, 19, 72, 260, 923, 3243, 11313, 39275, 135938, 469544, 1619688, 5582154, 19227215, 66200580, 227874107, 784248508, 2698752555, 9286235592, 31951747845, 109934789410, 378238848290, 1301340023409, 4477248965334, 15403837196135, 52996202385909
Offset: 0

Views

Author

Alois P. Heinz, Apr 29 2021

Keywords

Examples

			a(0) = 0: [].
a(1) = 1: [1].
a(2) = 5 = 2+3: [1,1], [1,2].
a(3) = 19 = 3+4+5+7: [1,1,1], [1,1,2], [1,2,2], [1,2,4].
a(4) = 72 = 4+5+7+6+8+7+9+11+15: [1,1,1,1], [1,1,1,2], [1,1,1,4], [1,1,2,2], [1,1,2,4], [1,2,2,2], [1,2,2,4], [1,2,4,4], [1,2,4,8].
a(5) = 260 = 5+6+8+7+9+11+15+8+10+12+16+9+11+15+13+17+15+19+23+31: [1,1,1,1,1], [1,1,1,1,2], [1,1,1,1,4], [1,1,1,2,2], [1,1,1,2,4], [1,1,1,4,4], [1,1,1,4,8], [1,1,2,2,2], [1,1,2,2,4], [1,1,2,4,4], [1,1,2,4,8], [1,2,2,2,2], [1,2,2,2,4], [1,2,2,2,8], [1,2,2,4,4], [1,2,2,4,8], [1,2,4,4,4], [1,2,4,4,8], [1,2,4,8,8], [1,2,4,8,16].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, [1, 0],
         `if`(t=0, 0, (p-> p+[0, p[2]])(b(n, iquo(t, 2)))+
                      (p-> p+[0, p[1]])(b(n-1, t+1))))
        end:
    a:= n-> b(n, 1)[2]:
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, t_] := b[n, t] = If[n == 0, {1, 0}, If[t == 0, {0, 0},
         With[{p = b[n, Quotient[t, 2]]}, p + {0, p[[2]]}] +
         With[{p = b[n - 1, t + 1]}, p + {0, p[[1]]}]]];
    a[n_] := b[n, 1][[2]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 02 2022, after Alois P. Heinz *)