|
|
A178963
|
|
E.g.f.: (3+2*sqrt(3)*exp(x/2)*sin(sqrt(3)*x/2))/(exp(-x)+2*exp(x/2)*cos(sqrt(3)*x/2)).
|
|
8
|
|
|
1, 1, 1, 1, 3, 9, 19, 99, 477, 1513, 11259, 74601, 315523, 3052323, 25740261, 136085041, 1620265923, 16591655817, 105261234643, 1488257158851, 17929265150637, 132705221399353, 2172534146099019, 30098784753112329, 254604707462013571, 4736552519729393091, 74180579084559895221, 705927677520644167681, 14708695606607601165843, 256937013876000351610089, 2716778010767155313771539
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
According to Mendes and Remmel, p. 56, this is the e.g.f. for 3-alternating permutations.
|
|
LINKS
|
Anthony Mendes and Jeffrey Remmel, Generating functions from symmetric functions, Preliminary version of book, available from Jeffrey Remmel's home page.
|
|
FORMULA
|
|
|
MAPLE
|
A178963_list := proc(dim) local E, DIM, n, k;
DIM := dim-1; E := array(0..DIM, 0..DIM); E[0, 0] := 1;
for n from 1 to DIM do
if n mod 3 = 0 then E[n, 0] := 0 ;
for k from n-1 by -1 to 0 do E[k, n-k] := E[k+1, n-k-1] + E[k, n-k-1] od;
else E[0, n] := 0;
for k from 1 by 1 to n do E[k, n-k] := E[k-1, n-k+1] + E[k-1, n-k] od;
fi od; [E[0, 0], seq(E[k, 0]+E[0, k], k=1..DIM)] end:
# Alternatively, using a bivariate exponential generating function:
g := (x, z) -> 3*exp(x*z)/(exp(z)+2*exp(-z/2)*cos(z*sqrt(3)/2));
p := (n, x) -> n!*coeff(series(g(x, z), z, n+2), z, n);
q := (n, m) -> if modp(n, m) = 0 then 0 else 1 fi:
(-1)^floor(n/3)*p(n, q(n, 3)) end:
# third Maple program:
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
`if`(t=0, add(b(u-j, o+j-1, irem(t+1, 3)), j=1..u),
add(b(u+j-1, o-j, irem(t+1, 3)), j=1..o)))
end:
a:= n-> b(n, 0, 0):
|
|
MATHEMATICA
|
max = 30; f[x_] := (E^x*(2*Sqrt[3]*E^(x/2)*Sin[(Sqrt[3]*x)/2] + 3))/(2*E^((3*x)/2)*Cos[(Sqrt[3]*x)/2] + 1); CoefficientList[Series[f[x], {x, 0, max}], x]*Range[0, max]! // Simplify (* Jean-François Alcover, Sep 16 2013 *)
|
|
PROG
|
A178963 = lambda n: (-1)^int(is_odd(n//3))*A(3, n)
|
|
CROSSREFS
|
Cf. A249402, A249583 (alternative definitions of 3-alternating permutations).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|