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!)
A024167 a(n) = n!*(1 - 1/2 + 1/3 - ... + c/n), where c = (-1)^(n+1). 36

%I #67 Jun 20 2022 14:26:31

%S 1,1,5,14,94,444,3828,25584,270576,2342880,29400480,312888960,

%T 4546558080,57424792320,948550176000,13869128448000,256697973504000,

%U 4264876094976000,87435019510272000,1627055289796608000,36601063093905408000,754132445894209536000

%N a(n) = n!*(1 - 1/2 + 1/3 - ... + c/n), where c = (-1)^(n+1).

%C Stirling transform of (-1)^n*a(n-1) = [0, 1, -1, 5, -14, 94, ...] is A000629(n-2) = [0, 1, 2, 6, 26, ...]. - _Michael Somos_, Mar 04 2004

%C Stirling transform of a(n) = [1, 1, 5, 14, 94, ...] is A052882(n) = [1, 2, 9, 52, 375, ...]. - _Michael Somos_, Mar 04 2004

%C a(n) is the number of n-permutations that have a cycle with length greater than n/2. - _Geoffrey Critzer_, May 28 2009

%C From _Jens Voß_, May 07 2010: (Start)

%C a(4n) is divisible by 6*n + 1 for all n >= 1; the quotient of a(4*n) and 6*n+1 is A177188(n).

%C a(4*n+3) is divisible by 6*n + 5 for all n >= 0; the quotient of a(4*n+3) and 6*n + 5 is A177174(n). (End)

%H Seiichi Manyama, <a href="/A024167/b024167.txt">Table of n, a(n) for n = 1..449</a>

%F E.g.f.: log(1 + x)/(1 - x). - _Vladeta Jovovic_, Aug 25 2002

%F a(n) = a(n-1) + a(n-2) * (n-1)^2, n > 1. - _Michael Somos_, Oct 29 2002

%F b(n) = n! satisfies the above recurrence with b(1) = 1, b(2) = 2. This gives the finite continued fraction expansion a(n)/n! = 1/(1 + 1^2/(1 + 2^2/(1 + 3^2/(1 + ... + (n-1)^2/1)))). Cf. A142979. - _Peter Bala_, Jul 17 2008

%F a(n) = A081358(n) - A092691(n). - _Gary Detlefs_, Jul 09 2010

%F E.g.f.: (x/(x-1))/G(0) where G(k) = -1 + (x-1)*k + x*(k+1)^2/G(k+1); (continued fraction, Euler's 1st kind, 1-step). - _Sergei N. Gladkovskii_, Aug 18 2012

%F a(n) ~ log(2)*n!. - _Daniel Suteu_, Dec 03 2016

%F a(n) = (1/2)*n!*((-1)^n*(digamma((n+1)/2) - digamma((n+2)/2)) + log(4)). - _Daniel Suteu_, Dec 03 2016

%F a(n) = n!*(log(2) - (-1)^n*LerchPhi(-1, 1, n+1)). - _Peter Luschny_, Dec 27 2018

%F a(n) = A054651(n,n-1). - _Pontus von Brömssen_, Oct 25 2020

%F a(n) = Sum_{k=0..n} (-1)^k*k!*A094587(n, k+1). - _Mélika Tebni_, Jun 20 2022

%e G.f. = x + x^2 + 5*x^3 + 14*x^4 + 94*x^5 + 444*x^6 + 3828*x^7 + 25584*x^8 + ...

%p a := n -> n!*(log(2) - (-1)^n*LerchPhi(-1, 1, n+1));

%p seq(simplify(a(n)), n=1..20); # _Peter Luschny_, Dec 27 2018

%t f[k_] := k (-1)^(k + 1)

%t t[n_] := Table[f[k], {k, 1, n}]

%t a[n_] := SymmetricPolynomial[n - 1, t[n]]

%t Table[a[n], {n, 1, 18}] (* A024167 signed *)

%t (* _Clark Kimberling_, Dec 30 2011 *)

%t a[ n_] := If[ n < 0, 0, n! Sum[ -(-1)^k / k, {k, n}]]; (* _Michael Somos_, Nov 28 2013 *)

%t a[ n_] := If[ n < 0, 0, n! (PolyGamma[n + 1] - PolyGamma[(n + Mod[n, 2, 1]) / 2])]; (* _Michael Somos_, Nov 28 2013 *)

%t a[ n_] := If[ n < 1, 0, (-1)^Quotient[n, 2] SymmetricPolynomial[ n - 1, Table[ -(-1)^k k, {k, n}]]]; (* _Michael Somos_, Nov 28 2013 *)

%o (PARI) {a(n) = if( n<0, 0, n! * polcoeff( log(1 + x + x * O(x^n)) / (1 - x), n))}; /* _Michael Somos_, Mar 02 2004 */

%o (PARI) x='x+O('x^33); Vec(serlaplace(log(1+x)/(1-x))) \\ _Joerg Arndt_, Dec 27 2018

%o (Python)

%o def A():

%o a, b, n = 1, 1, 2

%o yield(a)

%o while True:

%o yield(a)

%o b, a = a, a + b * n * n

%o n += 1

%o a = A(); print([next(a) for _ in range(20)]) # _Peter Luschny_, May 19 2020

%Y Cf. A024168, A000254, A054651, A094587, A142979, A177174, A177188.

%K nonn,easy

%O 1,3

%A _Clark Kimberling_

%E More terms from _Benoit Cloitre_, Jan 27 2002

%E a(21)-a(22) from _Pontus von Brömssen_, Oct 25 2020

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 April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)