Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A162969
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A162969 Number of permutations of {1,2,...,n} in which the fixed points and the non-fixed points alternate (n>=1). +0
1
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; listen)
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: A141704 A061919 A002098 this_sequence A104109 A066347 A118596

Adjacent sequences: A162966 A162967 A162968 this_sequence A162970 A162971 A162972

KEYWORD

nonn

AUTHOR

Emeric Deutsch (deutsch(AT)duke.poly.edu), Jul 19 2009

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research