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.

A336484 Total number of left-to-right minima in all compositions of n.

Original entry on oeis.org

0, 1, 2, 5, 10, 22, 45, 93, 190, 387, 783, 1583, 3191, 6422, 12907, 25916, 51993, 104245, 208902, 418466, 837994, 1677694, 3358127, 6720661, 13448413, 26908246, 53834890, 107699435, 215446685, 430970500, 862065453, 1724331779, 3448987855, 6898499386
Offset: 0

Views

Author

Alois P. Heinz, Jul 22 2020

Keywords

Examples

			a(4) = 10: (1)111, (1)12, (1)21, (2)(1)1, (2)2, (1)3, (3)(1), (4).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m, c) option remember; `if`(n=0, c, add(
          b(n-j, min(m, j), c+`if`(j b(n, n+1, 0):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, m_, c_] := b[n, m, c] = If[n == 0, c, Sum[
         b[n - j, Min[m, j], c + If[j < m, 1, 0]], {j, 1, n}]];
    a[n_] := b[n, n+1, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)