A001705 Generalized Stirling numbers: a(n) = n! * Sum_{k=0..n-1} (k+1)/(n-k).
0, 1, 5, 26, 154, 1044, 8028, 69264, 663696, 6999840, 80627040, 1007441280, 13575738240, 196287356160, 3031488633600, 49811492505600, 867718162483200, 15974614352793600, 309920046408806400, 6320046028584960000, 135153868608460800000, 3024476051557847040000
Offset: 0
Examples
(1-x)^-2 * (-log(1-x)) = x + 5/2*x^2 + 13/3*x^3 + 77/12*x^4 + ... Examples: a(6) = 6!*(1/6 + 2/5 + 3/4 + 4/3 + 5/2 + 6/1) = 8028; a(20) = 20!*(1/20 + 2/19 + 3/18 + 4/17 + 5/16 + ... + 16/5 + 17/4 + 18/3 + 19/2 + 20/1) = 135153868608460800000. - _Alexander Adamchuk_, Oct 09 2004 From _Olivier Gérard_, Dec 31 2012: (Start) The cycle decomposition of all permutations of 4 elements gives the following list: {{{1},{2},{3},{4}}, {{1},{2},{3,4}}, {{1},{2,3},{4}}, {{1},{2,4,3}}, {{1},{2,3,4}}, {{1},{2,4},{3}}, {{1,2},{3},{4}}, {{1,2},{3,4}}, {{1,3,2},{4}},{{1,4,3,2}}, {{1,3,4,2}}, {{1,4,2},{3}}, {{1,2,3},{4}}, {{1,2,4,3}},{{1,3},{2},{4}}, {{1,4,3},{2}}, {{1,3},{2,4}}, {{1,4,2,3}}, {{1,2,3,4}}, {{1,2,4},{3}}, {{1,3,4},{2}}, {{1,4},{2},{3}}, {{1,3,2,4}}, {{1,4},{2,3}}}. Deleting the fixed points gives the following 26 items: {{3,4}, {2,3}, {2,4,3}, {2,3,4}, {2,4}, {1,2}, {1,2}, {3,4}, {1,3,2}, {1,4,3,2}, {1,3,4,2}, {1,4,2}, {1,2,3}, {1,2,4,3}, {1,3}, {1,4,3}, {1,3}, {2,4}, {1,4,2,3}, {1,2,3,4}, {1,2,4}, {1,3,4}, {1,4}, {1,3,2,4}, {1,4}, {2,3}}. (End)
References
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..445 (terms 0 through 100 were provided by T. D. Noe)
- J.-L. Baril and S. Kirgizov, The pure descent statistic on permutations, preprint, 2016.
- J.-L. Baril and S. Kirgizov, The pure descent statistic on permutations, Discrete Mathematics, 340(10) (2017), 2550-2558.
- Jean-Luc Baril and Sergey Kirgizov, Transformation à la Foata for special kinds of descents and excedances, arXiv:2101.01928 [math.CO], 2021.
- Gang Chen, Henrik Johansson, Fei Teng, and Tianheng Wang, Next-to-MHV Yang-Mills kinematic algebra, arXiv:2104.12726 [hep-th], 2021. See p. 46.
- Loïc Foissy, Cointeraction on noncrossing partitions and related polynomial invariants, arXiv:2501.18212 [math.CO], 2025. See p. 24.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 406.
- D. S. Mitrinovic and M. S. Mitrinovic, Tableaux d'une classe de nombres reliés aux nombres de Stirling, Univ. Beograd. Publ. Elektrotehn. Fak. Ser. Mat. Fiz. No. 77 (1962), 1-77.
- Robert E. Moritz, On the sum of products of n consecutive integers, Univ. Washington Publications in Math., 1 (No. 3, 1926), 44-49. [Annotated scanned copy]
- Motohico Mulase, In Search of a Hidden Curve, arXiv:2501.00716 [math.QA], 2025. See p. 27.
- J. Riordan, Letter of 04/11/74.
- J. Riordan, Letter, Jul 06 1978.
Crossrefs
Cf. A000254 (total number of cycles in permutations, including fixed points).
Cf. A002104 (number of different cycles in permutations, without fixed points).
Cf. A006231 (number of different cycles in permutations, including fixed points).
Related to n!*the k-th successive summation of the harmonic numbers:
Programs
-
Maple
a := n-> add((n+1)!/k, k=2..n+1): seq(a(n), n=0..21); # Zerinvary Lajos, Jan 22 2008; edited Johannes W. Meijer, Nov 28 2012 a := n -> ((n+1)!*(h(n+1)-1)): h := n-> harmonic(n): seq(a(n), n=0..21); # Gary Detlefs, Dec 18 2009; corrected by Johannes W. Meijer, Nov 28 2012
-
Mathematica
Table[n!*Sum[Sum[1/k,{k,1,m}], {m,1,n}], {n,0,20}] (* Alexander Adamchuk, Apr 14 2006 *) a[n_] := (n + 1)! (EulerGamma - 1 + PolyGamma[n + 2]); Table[a[n], {n, 0, 21}] (* Peter Luschny, Feb 19 2022 *)
-
Maxima
a(n):=n!*sum(((-1)^(k+1)*binomial(n+1,k+1))/k,k,1,n); /* Vladimir Kruchinin, Oct 10 2016 */
-
PARI
for(n=0,25, print1(n!*sum(k=0,n-1,(k+1)/(n-k)), ", ")) \\ G. C. Greubel, Jan 20 2017
-
Python
from math import factorial def A001705(n): f = factorial(n) return sum(f*(k+1)//(n-k) for k in range(n)) # Chai Wah Wu, Jun 23 2022
Formula
Partial sum of first n harmonic numbers multiplied by n!.
a(n) = n!*Sum_{m=1..n} Sum_{k=1..m} 1/k = n!*Sum_{m=1..n} H(m), where H(m) = Sum_{k=1..m} 1/k = A001008(m)/A002805(m) is m-th Harmonic number.
E.g.f.: - log (1 - x) / (1 - x)^2.
a(n) = (n+1)! * H(n) - n*n!, H(n) = Sum_{k=1..n} (1/k).
a(n) = A112486(n, 1).
a(n) = a(n-1)*(n+1) + n! = A000254(n+1) - A000142(n+1) = A067176(n+1, 1). - Henry Bottomley, Jan 09 2002
a(n) = Sum_{k=0..n-1} ((-1)^(n-1+k) * (k+1) * 2^k * Stirling1(n, k+1)). - Borislav Crstici (bcrstici(AT)etv.utt.ro), Jan 26 2004
With alternating signs: Ramanujan polynomials psi_2(n, x) evaluated at 0. - Ralf Stephan, Apr 16 2004
a(n) = Sum_{k=1..n} (k*StirlingCycle(n+1,k+1)). - David Callan, Sep 25 2006
a(n) = Sum_{k=n..n*(n+1)/2} k*A143947(n,k). - Emeric Deutsch, Sep 22 2008
For n >= 1, a(n) = Sum_{j=0..n-1} ((-1)^(n-j-1) * 2^j * (j+1) * Stirling1(n,j+1)). - Milan Janjic, Dec 14 2008
a(n) = (2*n+1)*a(n-1) - n^2*a(n-2). - Gary Detlefs, Nov 27 2009
a(n) = (n+1)!*(H(n+1) - 1) where H(n) is the n-th harmonic number. - Gary Detlefs, Dec 18 2009
a(n) = n!*Sum_{k=1..n} (-1)^(k+1)*binomial(n+1,k+1)/k. - Vladimir Kruchinin, Oct 10 2016
a(n) = (n+1)!*Sum_{k = 1..n} (-1)^(k+1)*binomial(n+1,k+1)*k/(k+1). - Peter Bala, Feb 15 2022
a(n) = Gamma(n + 2) * (Digamma(n + 2) + EulerGamma - 1). - Peter Luschny, Feb 19 2022
From Mélika Tebni, Jun 22 2022: (Start)
a(n) = -Sum_{k=0..n} k!*A066667(n, k+1).
a(n) = Sum_{k=0..n} k!*A132159(n, k+1). (End)
a(n) = n*(n + 1)!*hypergeom([1, 1, 1 - n], [2, 3], 1)/2. - Peter Luschny, Jun 22 2022
Extensions
More terms from Sascha Kurz, Mar 22 2002
Comments