OFFSET
0,8
LINKS
R. A. Brualdi and Emeric Deutsch, Adjacent q-cycles in permutations, arXiv:1005.0781 [math.CO], 2010.
FORMULA
G.f.: (1/6) * Sum_{k>=3} k! * x^(k+3) / (1+x^2)^(k+1).
a(n) = (1/6) * Sum_{k=0..floor(n/2)-3} (-1)^k * (n-k-3)! / k!.
a(n) ~ n! / (6*n^3). - Vaclav Kotesovec, Feb 21 2024
MAPLE
a:= proc(n) option remember; `if`(n<7, [0$6, 1][n+1], ((n-5)*(n-6)*(n-3)*a(n-1)
-6*(n-4)*a(n-2)+(n-2)*(n-3)*((n-5)*a(n-3)+a(n-4)))/((n-5)*(n-6)))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Feb 21 2024
PROG
(PARI) my(N=30, x='x+O('x^N)); concat([0, 0, 0, 0, 0, 0], Vec(sum(k=3, N, k!*x^(k+3)/(1+x^2)^(k+1))/6))
(PARI) a(n, k=3, q=2) = sum(j=0, n\q-k, (-1)^j*(n-(q-1)*(j+k))!/j!)/k!;
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 21 2024
STATUS
approved