OFFSET
2,2
COMMENTS
It appears that a(n) = sum of invc(p) over all permutations p of {1,2,...,n}, where invc(p) is defined (by Carlitz) in the following way: express p in standard cycle form (i.e., cycles ordered by increasing smallest elements with each cycle written with its smallest element in the first position), then remove the parentheses and count the inversions in the obtained word. a(3)=2 because the six permutations 123,132,312,213,231 and 321 of {1,2,3} yield the words 123,123,132,123,123 and 132, respectively, having a total of 0+0+1+0+0+1 = 2 inversions. a(n) = Sum_{k>=0} k*A129178(n,k). - Emeric Deutsch, Oct 10 2007
REFERENCES
L. Carlitz, Generalized Stirling numbers, Combinatorial Analysis Notes, Duke University, 1968, 1-7.
LINKS
G. C. Greubel, Table of n, a(n) for n = 2..445
M. Shattuck, Parity theorems for statistics on permutations and Catalan words, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 5, Paper A07, 2005.
N. J. A. Sloane, Notes on Carlo Wood's Polynomials
FORMULA
a(n) = n! * (n*(n-5)/4 + 1 + 1/2 + ... + 1/n). - Emeric Deutsch, Oct 10 2007
E.g.f.: (2*x - 3*x^2 + 2*(1-x)^2 * log(1-x)) / (2*(-1+x)^3). - G. C. Greubel, May 05 2019
MAPLE
seq(factorial(n)*(sum(1/k, k = 1 .. n)+(1/4)*n*(n-5)), n = 2 .. 21) # Emeric Deutsch, Oct 10 2007
MATHEMATICA
Table[n!*(n*(n-5)/4 + HarmonicNumber[n]), {n, 2, 25}] (* G. C. Greubel, May 05 2019 *)
PROG
(PARI) my(x='x+O('x^30)); concat([0], Vec(serlaplace( (2*x - 3*x^2 + 2*(1-x)^2*log(1-x))/(2*(-1+x)^3) ))) \\ G. C. Greubel, May 05 2019
(Magma) [Factorial(n)*(n*(n-5)/4 + HarmonicNumber(n)): n in [2..25]]; // G. C. Greubel, May 05 2019
(Sage) [factorial(n)*(n*(n-5)/4 + harmonic_number(n)) for n in (2..25)] # G. C. Greubel, May 05 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane and Carlo Wood (carlo(AT)alinoe.com), Feb 13 2007
STATUS
approved