login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078509 Number of permutations p of {1,2,...,n} such that p(i)-i != 1 and p(i)-i != 2 for all i. 2
1, 1, 1, 1, 5, 23, 131, 883, 6859, 60301, 591605, 6405317, 75843233, 974763571, 13512607303, 200949508327, 3190881283415, 53880906258521, 964039575154409, 18217997734199113, 362584510633666621, 7580578211464070863, 166099466140519353035, 3806162403831340850651 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
From Vladeta Jovovic, Jul 16 2007: (Start)
G.f.: x/(1+x)*Sum_{n>=0} (n+1)!*(x/(1+x)^2)^n.
a(n) = Sum_{k=1..n} (-1)^(n-k)*k!*binomial(n+k-2,2*k-2). (End)
a(n) ~ exp(-2) * n!. - Vaclav Kotesovec, Aug 25 2014
MAPLE
a:= proc(n) option remember; `if`(n<4, 1,
(n-1)*a(n-1) +(n-3)*a(n-2) +a(n-3))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Jan 10 2014
MATHEMATICA
a = DifferenceRoot[Function[{y, n}, {-y[n] - n y[n+1] - (n+2) y[n+2] + y[n+3] == 0, y[0] == 1, y[1] == 1, y[2] == 1, y[3] == 1}]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A293088 A186755 A009321 * A239820 A077240 A281231
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Alois P. Heinz, Jan 10 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 10 07:40 EDT 2024. Contains 375773 sequences. (Running on oeis4.)