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.

A231166 Number of permutations of [n] avoiding simultaneously consecutive patterns 1243, 1342, and 1324.

Original entry on oeis.org

1, 1, 2, 6, 21, 91, 467, 2755, 18523, 139740, 1169616, 10763807, 108028386, 1174391384, 13748315494, 172439034531, 2306986699190, 32792999417180, 493559520202535, 7841127918788283, 131127477517244419, 2302491655047553206, 42355105188617740229
Offset: 0

Views

Author

Alois P. Heinz, Nov 04 2013

Keywords

Examples

			a(4) = 24 - 3 = 21 because 1243, 1342, 1324 are avoided.
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o, s, t) option remember; `if`(u+o=0, 1,
           add(b(u-j, o+j-1, `if`(t>0, t, 0), `if`(t>0, -j, 0)),
               j=`if`(s>0 and t>0,s+t-1,1)..u)+
           add(b(u+j-1, o-j, `if`(t>0, t, 0), +j),
               j=1..`if`(s>0 and t<0 and -t b(n, 0$3):
    seq(a(n), n=0..25);
  • Mathematica
    b[u_, o_, s_, t_] := b[u, o, s, t] = If[u + o == 0, 1, Sum[b[u - j, o + j - 1, If[t > 0, t, 0], If[t > 0, -j, 0]], {j, If[s > 0 && t > 0, s + t - 1, 1], u}] + Sum[b[u + j - 1, o - j, If[t > 0, t, 0], +j], {j, 1, If[s > 0 && t < 0 && -t < s, -t - 1, o]}]];
    a[n_] := b[n, 0, 0, 0];
    a /@ Range[0, 25] (* Jean-François Alcover, Feb 27 2020, after Alois P. Heinz *)