|
|
A024168
|
|
a(n) = n! * (1 + Sum_{j=1..n} (-1)^j/j).
|
|
11
|
|
|
1, 0, 1, 1, 10, 26, 276, 1212, 14736, 92304, 1285920, 10516320, 166112640, 1680462720, 29753498880, 359124192000, 7053661440000, 98989454592000, 2137497610752000, 34210080898560000, 805846718380032000, 14489879077804032000, 369868281883398144000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
a(n) is the number of permutations of n letters all cycles of which have length <= n/2, a quantity which arises in the solution to the One Hundred Prisoners problem. - Jim Ferry (jferry(AT)alum.mit.edu), Mar 29 2007
|
|
LINKS
|
|
|
FORMULA
|
E.g.f.: (log(x+1)-1)/(x-1).
a(n) = a(n-1)+a(n-2)*(n-1)^2, n>=2. (End)
a(0) = 1, a(n) = a(n-1)*n + (-1)^n*(n-1)!. - Daniel Suteu, Feb 06 2017
a(n) = n!*((-1)^n*LerchPhi(-1, 1, n+1) + 1 - log(2)). - Peter Luschny, Dec 27 2018
|
|
MAPLE
|
a := n -> n!*((-1)^n*LerchPhi(-1, 1, n + 1) + 1 - log(2));
|
|
MATHEMATICA
|
f[k_] := (k + 1) (-1)^(k + 1)
t[n_] := Table[f[k], {k, 1, n}]
a[n_] := SymmetricPolynomial[n - 1, t[n]]
Table[a[n], {n, 1, 22}] (* A024168 signed *)
|
|
PROG
|
(PARI) x='x+O('x^33); concat([0], Vec(serlaplace((x-log(1+x))/(1-x)))) \\ Joerg Arndt, Dec 27 2018
|
|
CROSSREFS
|
A075829(n) = a(n-1)/gcd(a(n-1), a(n)).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|