OFFSET
0,5
COMMENTS
According to Mendes and Remmel, p. 56, this is the e.g.f. for 3-alternating permutations.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
J. M. Luck, On the frequencies of patterns of rises and falls, arXiv preprint arXiv:1309.7764 [cond-mat.stat-mech], 2013-2014.
Peter Luschny, An old operation on sequences: the Seidel transform.
Anthony Mendes and Jeffrey Remmel, Generating functions from symmetric functions, Preliminary version of book, available from Jeffrey Remmel's home page.
Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [USA access only through the HATHI TRUST Digital Library]
Ludwig Seidel, Über eine einfache Entstehungsweise der Bernoulli'schen Zahlen und einiger verwandten Reihen, Sitzungsberichte der mathematisch-physikalischen Classe der königlich bayerischen Akademie der Wissenschaften zu München, volume 7 (1877), 157-187. [Access through ZOBODAT]
FORMULA
a(3*n) = A002115(n). - Peter Luschny, Aug 02 2012
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:
A178963_list(30); # Peter Luschny, Apr 02 2012
# Alternatively, using a bivariate exponential generating function:
A178963 := proc(n) local g, p, q;
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:
seq(A178963(i), i=0..30); # Peter Luschny, Jun 06 2012
# 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):
seq(a(n), n=0..35); # Alois P. Heinz, Oct 29 2014
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
(Sage) # uses[A from A181936]
A178963 = lambda n: (-1)^int(is_odd(n//3))*A(3, n)
print([A178963(n) for n in (0..30)]) # Peter Luschny, Jan 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 31 2010
STATUS
approved