OFFSET
0,4
REFERENCES
Warren D. Smith, Postings to Math Fun Mailing List, Feb 06 2014 - Feb 08 2014.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..440
FORMULA
a(0)=a(1)=0; a(n) = Sum_(k=1,3,5,..., whichever is odd among {n-1, n-2}) (k!-a(k))*(n-k)!.
To see why this recurrence holds, enumerate all the a(n) permutations of {1,2,3,...,n} which fix an odd prefix. They are:
perms of form their count
1... (n-1)!
(123)... (3!-2)*(n-3)! where we count only the ones not of the preceding form; that is, (3!-a(3))*(n-3)!
(12345)... (5!-a(5))*(n-5)! where again count only those not of preceding two forms,
and so on. [Warren D. Smith]
a(n) ~ (3+(-1)^n)/2 * (n-1)!. - Vaclav Kotesovec, Feb 15 2014
MAPLE
F := array(1..66); F[1] := 0;
F[2] := 1;
for n from 3 to 66 do
F[n] := sum( ((2*j+1)! - F[2*j+1]) * (n-(2*j+1))!, j=0 .. (n-2)/2 );
od; # From Warren D. Smith, Feb 12 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 11 2014
STATUS
approved