|
| |
|
|
A162969
|
|
Number of permutations of {1,2,...,n} in which the fixed points and the non-fixed points alternate (n>=1).
|
|
0
| |
|
|
1, 0, 1, 2, 3, 4, 11, 18, 53, 88, 309, 530, 2119, 3708, 16687, 29666, 148329, 266992, 1468457, 2669922, 16019531, 29369140, 190899411, 352429682, 2467007773, 4581585864, 34361893981, 64142202098, 513137616783, 962133031468
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,4
|
|
|
FORMULA
| a(2n-1)=d(n-1)+d(n), a(2n)=2d(n), where d(j)=A000166(j) is a derangement number.
|
|
|
EXAMPLE
| a(5)=3 because we have 14325, 32541, and 52143;
a(6)=4 because we have 143652, 163254, 325416, and 521436.
|
|
|
MAPLE
| d := proc (n) if n = 0 then 1 else n*d(n-1)+(-1)^n end if end proc: a := proc (n) if `mod`(n, 2) = 0 then 2*d((1/2)*n) else d((1/2)*n-1/2)+d((1/2)*n+1/2) end if end proc: seq(a(n), n = 1 .. 36);
|
|
|
CROSSREFS
| A000166
Sequence in context: A061919 A192613 A002098 * A104109 A066347 A118596
Adjacent sequences: A162966 A162967 A162968 * A162970 A162971 A162972
|
|
|
KEYWORD
| nonn
|
|
|
AUTHOR
| Emeric Deutsch (deutsch(AT)duke.poly.edu), Jul 19 2009
|
| |
|
|