login
A250264
Number of permutations p of [n] such that p(i) > p(i+1) iff i == 1 (mod 8).
2
1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 71, 430, 1749, 5708, 16003, 40026, 91505, 194464, 3111409, 32514338, 220345299, 1161515620, 5117035637, 19624019910, 67294308247, 210311057024, 4860499987799, 72178664783758, 684803123126277, 4985006104393196, 29947298627248915
OFFSET
0,4
LINKS
MAPLE
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t=1, add(b(u-j, o+j-1, irem(t+1, 8)), j=1..u),
add(b(u+j-1, o-j, irem(t+1, 8)), j=1..o)))
end:
a:= n-> b(0, n, 0):
seq(a(n), n=0..35);
MATHEMATICA
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t == 1, Sum[b[u - j, o + j - 1, Mod[t + 1, 8]], {j, 1, u}], Sum[b[u + j - 1, o - j, Mod[t + 1, 8]], {j, 1, o}]]];
a[n_] := b[0, n, 0];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jul 22 2019, after Alois P. Heinz *)
CROSSREFS
Column k=8 of A250261.
Sequence in context: A004859 A237345 A024655 * A273476 A278943 A303167
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 15 2014
STATUS
approved