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.

A294281 Number of ascent sequences of length n with alternating ascents and descents (unaffected by level steps).

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 59, 172, 547, 1886, 7047, 28360, 122675, 567210, 2796999, 14641044, 81191947, 475148678, 2929442263, 18965690560, 128754649699, 914056305794, 6777666961735, 52367331911180, 421188392986843, 3519168714308702, 30519733808467031
Offset: 0

Views

Author

Alois P. Heinz, Oct 26 2017

Keywords

Examples

			a(3) = 4: 000, 001, 010, 011.
a(4) = 9: 0000, 0001, 0010, 0011, 0100, 0101, 0102, 0110, 0111.
a(5) = 22: 00000, 00001, 00010, 00011, 00100, 00101, 00102, 00110, 00111, 01000, 01001, 01002, 01010, 01011, 01020, 01021, 01022, 01100, 01101, 01102, 01110, 01111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, u) option remember; `if`(n<1, 1, add(
           b(n-1, j, t+`if`(j>i, 1, 0), `if`(i=j, u, 1-u)),
           j=`if`(u=0, i..t+1, 0..i)))
        end:
    a:= n-> b(n-1, 0$3):
    seq(a(n), n=0..30);

Formula

a(n) = Sum_{j=0..n} binomial(n-1,j) * A099960(n-j).