A177551 Number of permutations of {1,...,n} avoiding adjacent step pattern up, up, down, up, up, up.
1, 1, 2, 6, 24, 120, 720, 5006, 39776, 355536, 3530880, 38581456, 459905790, 5938902464, 82590382604, 1230586598456, 19557934834104, 330265974019619, 5905113439990368, 111448391640387360, 2214092715361273978, 46185648021443324656, 1009303225985497077402
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
Crossrefs
Columns k=55,59 of A242784.
Programs
-
Maple
b:= proc(u, o, t) option remember; `if`(t>6, 0, `if`(u+o+t<7, (u+o)!, add(b(u-j, o+j-1, [1, 1, 4, 1, 1, 4][t]), j=1..u)+ add(b(u+j-1, o-j, [2, 3, 3, 5, 6, 7][t]), j=1..o))) end: a:= n-> b(n, 0, 1): seq(a(n), n=0..25); # Alois P. Heinz, Oct 23 2013
-
Mathematica
b[u_, o_, t_] := b[u, o, t] = If[t > 6, 0, If[u + o + t < 7, (u + o)!, Sum[b[u - j, o + j - 1, {1, 1, 4, 1, 1, 4}[[t]]], {j, 1, u}] + Sum[b[u + j - 1, o - j, {2, 3, 3, 5, 6, 7}[[t]]], {j, 1, o}]]]; a[n_] := b[n, 0, 1]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 19 2022, after Alois P. Heinz *)
Formula
a(n) ~ c * d^n * n!, where d = 0.993326320961568877764783962159580548643374705129260577..., c = 1.0404765828695886736964990440705643676428197038942922... . - Vaclav Kotesovec, Jan 17 2015