Nothing Special   »   [go: up one dir, main page]

login
Search: a001164 -id:a001164
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = (A001163(n)/A001164(n))*3*(2*n)!^2/n!!.
+20
1
3, 1, 3, -1390, -139895, 2064875400, 999912530925, -128585633463727440, -176876516433064573125, 109242473594498195269718400, 333170810414553853376721961875, -698025623281503752808511373154720000, -4073023833462008382211035330291042675375
OFFSET
0,1
COMMENTS
Coefficients in Stirling's asymptotic expansion of the Gamma function, normalized to integers using factor 3*(2*n)!^2/n!!.
LINKS
Eric Weisstein's World of Mathematics, Stirling's Series.
FORMULA
a(n) = 3*(2*n)!*(6*n+1)!!/(n!!*4^n) * Sum_{i=0..2*n} Sum_{j=0..i} Sum_{k=0..j} (-1)^k*2^i*k^(2*n+i+j)*C(2*n,i)*C(i,j)*C(j,k) / ((2*n+2*i+1)*(2*n+i+j)!), assuming 0^0 = 1 (when n = 0), n!! = A006882(n), C(n,k) = A007318(n,k) are binomial coefficients.
MAPLE
h := proc(k) option remember; local j; `if`(k=0, 1,
(h(k-1)/k-add((h(k-j)*h(j))/(j+1), j=1..k-1))/(1+1/(k+1))) end:
g := n -> doublefactorial(2*n-1)*(2*n)!^2/doublefactorial(n):
seq(3*h(2*n)*g(n), n=0..12); # Peter Luschny, Nov 05 2015
MATHEMATICA
Table[3 (2n)!^2/n!! (6n+1)!!/4^n Sum[(-1)^m 2^k StirlingS2[2n+k+m, m]/((2n+2k+1) (2n+k+m)! (2n-k)! (k-m)!), {k, 0, 2n}, {m, 0, k}], {n, 0, 12}]
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved
Stirling's formula: numerators of asymptotic series for Gamma function.
(Formerly M5400 N2347)
+10
29
1, 1, 1, -139, -571, 163879, 5246819, -534703531, -4483131259, 432261921612371, 6232523202521089, -25834629665134204969, -1579029138854919086429, 746590869962651602203151, 1511513601028097903631961, -8849272268392873147705987190261, -142801712490607530608130701097701
OFFSET
0,4
REFERENCES
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972, p. 257, Eq. 6.1.37.
L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 267, #23.
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
Seiichi Manyama, Table of n, a(n) for n = 0..227 (terms 0..100 from T. D. Noe)
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math.Series 55, Tenth Printing, 1972, p. 257, Eq. 6.1.37.
S. Brassesco, M. A. Méndez, The asymptotic expansion for the factorial and Lagrange inversion formula, arXiv:1002.3894 [math.CA], 2010.
V. De Angelis, Stirling's series revisited, Amer. Math. Monthly, 116 (2009), 839-843.
G. Marsaglia and J. C. W. Marsaglia, A new derivation of Stirling's approximation to n!, Amer. Math. Monthly, 97 (1990), 827-829. MR1080390 (92b:41049)
T. Mueller, Finite group actions and asymptotic expansion of e^P(z), Combinatorica, 17 (4) (1997), 523-554.
N. M. Temme, The asymptotic expansion of the incomplete gamma function, SIAM J. Math. Anal., 10 (1979), 757-766. [From N. J. A. Sloane, Feb 20 2012]
Eric Weisstein's World of Mathematics, Stirling's Series.
J. W. Wrench, Jr., Concerning two series for the gamma function, Math. Comp., 22 (1968), 617-626.
FORMULA
The coefficients c_k have g.f. 1 + Sum_{k >= 1} c_k/z^k = exp( Sum_{k >= 1} B_{2k}/(2k(2k-1)z^(2k-1)) ).
Numerators/denominators: A001163(n)/A001164(n) = (6*n+1)!!/(4^n*(2*n)!) * Sum_{i=0..2*n} Sum_{j=0..i} Sum_{k=0..j} (-1)^k*2^i*k^(2*n+i+j)*C(2*n,i) *C(i,j)*C(j,k)/((2*n+2*i+1)*(2*n+i+j)!), assuming 0^0 = 1 (when n = 0), n!! = A006882(n), C(n,k) = A007318(n,k) are binomial coefficients. - Vladimir Reshetnikov, Nov 05 2015
From Seiichi Manyama, Sep 01 2018: (Start)
Let B_n be the Bernoulli number, and define the sequence {c_n} by the recurrence
c_0 = 1, c_n = (1/n) * Sum_{k=0..n-1} B_{n-k+1}*c_k/(n-k+1) for n > 0.
a(n) is the numerator of c_n. (End)
EXAMPLE
Gamma(z) ~ sqrt(2*Pi) * z^(z-1/2) * e^(-z) * (1 + 1/(12*z) + 1/(288*z^2) - 139/(51840*z^3) - 571/(2488320*z^4) + ... ), z -> infinity in |arg z| < Pi.
MAPLE
h := proc(k) option remember; local j; `if`(k=0, 1,
(h(k-1)/k-add((h(k-j)*h(j))/(j+1), j=1..k-1))/(1+1/(k+1))) end:
StirlingAsympt := proc(n) option remember; h(2*n)*2^n*pochhammer(1/2, n) end:
A001163 := n -> numer(StirlingAsympt(n));
seq(A001163(n), n=0..30); # Peter Luschny, Feb 08 2011
MATHEMATICA
Numerator[ Reverse[ Drop[ CoefficientList[ Simplify[ PowerExpand[ Normal[ Series[n!, {n, Infinity, 17}]]Exp[n]/(Sqrt[2Pi n]*n^(n - 17))]], n], 1]]]
(* Second program: *)
h[k_] := h[k] = If[k==0, 1, (h[k-1]/k-Sum[h[k-j]*h[j]/(j+1), {j, 1, k-1}]) / (1+1/(k+1))];
StirlingAsympt[n_] := h[2n]*2^n*Pochhammer[1/2, n];
a[n_] := StirlingAsympt[n] // Numerator;
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 12 2015, after Peter Luschny *)
PROG
(PARI) a(n)=local(A, m); if(n<1, n==0, A=vector(m=2*n+1, k, 1); for(k=2, m, A[k]=(A[k-1]-sum(i=2, k-1, i*A[i]*A[k+1-i]))/(k+1)); numerator(A[m]*m!/2^n/n!)) /* Michael Somos, Jun 09 2004 */
(Sage)
def A001163(n):
@cached_function
def h(k):
if k<=0: return 1
S = sum((h(k-j)*h(j))/(j+1) for j in (1..k-1))
return (h(k-1)/k-S)/(1+1/(k+1))
return numerator(h(2*n)*2^n*rising_factorial(1/2, n))
[A001163(n) for n in range(17)] # Peter Luschny, Nov 05 2015
CROSSREFS
Cf. A001164 (denominators).
Cf. A097303 (see W. Lang link there for a similar numerator sequence which deviates for the first time at entry number 33. Expansion of GAMMA(z) in terms of 1/(k!*z^k) instead of 1/z^k).
Product_{z=1..n} z^(z^m): A143475/A143476 (m=1), A317747/A317796 (m=2), A318713/A318714 (m=3).
KEYWORD
sign,frac,nice
EXTENSIONS
More terms from Vladeta Jovovic, Nov 14 2001
Signs added by Robert G. Wilson v, Jul 12 2003
STATUS
approved
Denominators of an asymptotic series for the factorial function (Stirling's formula with half-shift).
+10
6
1, 24, 1152, 414720, 39813120, 6688604160, 4815794995200, 115579079884800, 22191183337881600, 263631258054033408000, 88580102706155225088000, 27636992044320430227456000, 39797268543821419527536640000
OFFSET
0,2
COMMENTS
From Peter Luschny, Feb 24 2011 (Start):
G_n = A182935(n)/A144618(n). These rational numbers provide the coefficients for an asymptotic expansion of the factorial function.
The relationship between these coefficients and the Bernoulli numbers are due to De Moivre, 1730 (see Laurie). (End)
Also denominators of polynomials mentioned in A144617.
Also denominators of polynomials mentioned in A144622.
FORMULA
z! ~ sqrt(2 Pi) (z+1/2)^(z+1/2) e^(-z-1/2) Sum_{n>=0} G_n / (z+1/2)^n.
- Peter Luschny, Feb 24 2011
EXAMPLE
G_0 = 1, G_1 = -1/24, G_2 = 1/1152, G_3 = 1003/414720.
MAPLE
G := proc(n) option remember; local j, R;
R := seq(2*j, j=1..iquo(n+1, 2));
`if`(n=0, 1, add(bernoulli(j, 1/2)*G(n-j+1)/(n*j), j=R)) end:
A144618 := n -> denom(G(n)); seq(A144618(i), i=0..12);
# Peter Luschny, Feb 24 2011
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Sum[ BernoulliB[j, 1/2]*a[n-j+1]/(n*j), {j, 2, n+1, 2}]; Table[a[n] // Denominator, {n, 0, 12}] (* Jean-François Alcover, Jul 26 2013, after Maple *)
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
N. J. A. Sloane, Jan 15 2009, based on email from Chris Kormanyos (ckormanyos(AT)yahoo.com)
EXTENSIONS
Added more terms up to polynomial number u_12, v_12 for the denominators of u_k, v_k. Christopher Kormanyos (ckormanyos(AT)yahoo.com), Jan 31 2009
Typo in definition corrected Aug 05 2010 by N. J. A. Sloane
A-number in definition corrected - R. J. Mathar, Aug 05 2010
Edited and new definition by Peter Luschny, Feb 24 2011
STATUS
approved
Numerator of the coefficient of z^(-n) in the Stirling-like asymptotic expansion of Product_{z=1..n} z^(z^2).
+10
6
1, -1, 1, 259193, -1036793, -201551328007, 9137074752049, 9142431862033871923, -11105299580705049589, -11003865617473929216508154207, 114467620015003245418244743007, 32505236416490926096399421788847363, -254505521478572052318535393350091231, -1828472168539763642032546635313363411876021
OFFSET
0,4
COMMENTS
1^(1^2)*2^(2^2)*...*n^(n^2) ~ A_2*n^(n^3/3+n^2/2+n/6)*exp(-n^3/9+n/12)*(Sum_{k>=0} b(k)/n^k)^n, where A_2 is the second Bendersky constant.
a(n) is the numerator of b(n).
FORMULA
Let B_n be the Bernoulli number, and define the sequence {c_n} by the recurrence
c_0 = 1, c_n = (2/n) * Sum_{k=0..n-1} B_{n-k+3}*c_k/((n-j+1)*(n-k+2)*(n-k+3)) for n > 0.
a(n) is the numerator of c_n.
EXAMPLE
1^(1^2)*2^(2^2)*...*n^(n^2) ~ A_2*n^(n^3/3+n^2/2+n/6)*exp(-n^3/9+n/12)*(1 - 1/(360*n) + 1/(259200*n^2) + 259193/(1959552000*n^3) - 1036793/(2821754880000*n^4) - 201551328007/(5079158784000000*n^5) + ... ).
CROSSREFS
Product_{z=1..n} z^(z^m): A001163/A001164 (m=0), A143475/A143476 (m=1), A317747/A317796 (m=2).
Cf. A051675, A243262 (A_2).
KEYWORD
sign,frac
AUTHOR
Seiichi Manyama, Sep 01 2018
STATUS
approved
Denominator of the coefficient of z^(-n) in the Stirling-like asymptotic expansion of Product_{z=1..n} z^(z^2).
+10
6
1, 360, 259200, 1959552000, 2821754880000, 5079158784000000, 76796880814080000000, 304115648023756800000000, 125121866615488512000000000, 258236518070374430146560000000000, 929651465053347948527616000000000000, 334674527419205261469941760000000000000, 920050700832433373350094438400000000000000
OFFSET
0,2
COMMENTS
1^(1^2)*2^(2^2)*...*n^(n^2) ~ A_2*n^(n^3/3+n^2/2+n/6)*exp(-n^3/9+n/12)*(Sum_{k>=0} b(k)/n^k)^n, where A_2 is the second Bendersky constant.
a(n) is the denominator of b(n).
FORMULA
Let B_n be the Bernoulli number, and define the sequence {c_n} by the recurrence
c_0 = 1, c_n = (2/n) * Sum_{k=0..n-1} B_{n-k+3}*c_k/((n-j+1)*(n-k+2)*(n-k+3)) for n > 0.
a(n) is the denominator of c_n.
EXAMPLE
1^(1^2)*2^(2^2)*...*n^(n^2) ~ A_2*n^(n^3/3+n^2/2+n/6)*exp(-n^3/9+n/12)*(1 - 1/(360*n) + 1/(259200*n^2) + 259193/(1959552000*n^3) - 1036793/(2821754880000*n^4) - 201551328007/(5079158784000000*n^5) + ... ).
CROSSREFS
Product_{z=1..n} z^(z^m): A001163/A001164 (m=0), A143475/A143476 (m=1), A317747/A317796 (m=2).
Cf. A051675, A243262 (A_2).
KEYWORD
nonn,frac
AUTHOR
Seiichi Manyama, Sep 01 2018
STATUS
approved
Numbers n such that n! has a square number of digits.
(Formerly M0830)
+10
5
0, 1, 2, 3, 7, 12, 18, 32, 59, 81, 105, 132, 228, 265, 284, 304, 367, 389, 435, 483, 508, 697, 726, 944, 1011, 1045, 1080, 1115, 1187, 1454, 1494, 1617, 1659, 1788, 1921, 2012, 2105, 2200, 2248, 2395, 2445, 2861, 2915, 3192, 3480, 3539, 3902, 3964, 4476
OFFSET
1,3
COMMENTS
Numbers whose square is represented by the number of digits of n!: 1, 2, 3, 4, 6, 9, 11, 13, 15, 21, 23, 24, 25, 28, 29, ..., . - Robert G. Wilson v, May 14 2014
From Bernard Schott, Jan 04 2020: (Start)
In M. Gardner's book, see reference, there is a tree printout of 105! with 169 digits, where the bottom row consists of the 25 trailing zeros of 105!. M. Gardner does not explain if this is the only factorial that can be displayed in a similar tree form.
Proof: If m! has q^2 digits, hence the number of trailing zeros in m! must be equal to 2*q-1 to satisfy this triangular look; m = 105 satisfies these two conditions with q = 13 because 105! has 13^2 = 169 digits and 2*13-1 = 25 trailing zeros.
When m < 105 and m! has q^2 digits (m <= 81), then q <= 11 and the number of trailing zeros is <= 2*q - 3.
When m > 105 and m! has q^2 digits (m >= 132), then q >= 15 and the number of trailing zeros is >= 2*q + 2.
Hence, only 105! presents such a tree printout.
1
081
39675
8240290
900504101
30580032964
9720646107774
902579144176636
57322653190990515
3326984536526808240
339776398934872029657
99387290781343681609728
0000000000000000000000000
(End)
REFERENCES
M. Gardner, Mathematical Magic Show. Random House, NY, 1978, p. 55.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
D. S. Kluk and N. J. A. Sloane, Correspondence, 1979
Eric Weisstein's World of Mathematics, Stirling's Approximation and Stirling's Series
MATHEMATICA
LogBase10Stirling[n_] := Floor[Log[10, 2 Pi n]/2 + n*Log[10, n/E] + Log[10, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5)]]; Select[ Range[ 4500], IntegerQ[ Sqrt[ (LogBase10Stirling[ # ] + 1)]] & ] (* The Mathematica coding comes from J. Stirling's expansion for the Gamma function; see the links. For more terms inside the last Log_10 function, use A001163 & A001164. Robert G. Wilson v, Apr 27 2014 *)
Select[Range[0, 4500], IntegerQ[Sqrt[IntegerLength[#!]]]&] (* Harvey P. Dale, Sep 27 2018 *)
PROG
(PARI) isok(n) = issquare(#Str(n!)); \\ Michel Marcus, Sep 05 2015
(Magma) [k:k in [0..5000]| IsSquare(#Intseq(Factorial(k)))]; // Marius A. Burtea, Jan 04 2020
CROSSREFS
Cf. A000142, A027868 (trailing zeros), A034886 (number of digits), A056851.
KEYWORD
nonn,base
STATUS
approved
Numerators of rational coefficients related to Stirling's asymptotic series for the Gamma function.
+10
5
1, 2, 1, -4, 1, 8, -139, 16, -571, -8992, 163879, -334144, 5246819, 698752, -534703531, 23349012224, -4483131259, -1357305243136, 432261921612371, -6319924923392, 6232523202521089, 8773495082018816, -25834629665134204969, 49004477022654464, -1579029138854919086429
OFFSET
0,2
COMMENTS
The rational numbers SGGS = A264148/A264149 (SGGS stands for 'Stirling Generalized Gamma Series') are a supersequence of the coefficients in Stirling's asymptotic series for the Gamma function A001163/A001164 and of an asymptotic expansion of Ramanujan A090804/A065973, further they appear in scaled form in an expansion of -W_{-1}(-e^{-1-x^2/2}) where W_{-1} is Lambert W function A005447/A005446.
Ramanujan's asymptotic expansion theta(n) = 1/3+4/(135n)-8/(2835n^2)- ... is considered in the literature also in the form 1-theta(n) (see for example formula (5) in the Choi link). It is this form to which we refer here.
LINKS
K. P. Choi, On the medians of gamma distributions and an equation of Ramanujan, Proceedings of the American Mathematical Society 121:1 (May, 1994), pp. 245-251. [From Vladimir Reshetnikov]
G. Nemes, On the coefficients of the asymptotic expansion of n!, J. Integer Seqs. 13 (2010), 5. [From Vladimir Reshetnikov]
FORMULA
Let SGGS(n) = h(n)*doublefactorial(n-1) where h(n) = 1 for n<=0 and for n>0 defined by the recurrence (h(k-1)/k - Sum_{j=1..k-1}((h(k-j)*h(j))/(j+1))/ (1+1/(k+1))) then a(n) = numerator(SGGS(n)).
MAPLE
h := proc(k) option remember; local j; `if`(k<=0, 1,
(h(k-1)/k-add((h(k-j)*h(j))/(j+1), j=1..k-1))/(1+1/(k+1))) end:
SGGS := n -> h(n)*doublefactorial(n-1):
A264148 := n -> numer(SGGS(n)): seq(A264148(n), n=0..24);
MATHEMATICA
h[k_] := h[k] = If[k <= 0, 1, (h[k - 1]/k - Sum[h[k - j]*h[j]/(j + 1), {j, 1, k - 1}]) / (1 + 1/(k + 1))]; a[n_] := h[n]* Factorial2[n - 1] // Numerator; Table[a[n], {n, 0, 24}]
PROG
(Sage)
def A264148(n):
@cached_function
def h(k):
if k<=0: return 1
S = sum((h(k-j)*h(j))/(j+1) for j in (1..k-1))
return (h(k-1)/k-S)/(1+1/(k+1))
return numerator(h(n)*(n-1).multifactorial(2))
print([A264148(n) for n in (0..17)])
CROSSREFS
A264148(n) = numerator(SGGS(n)).
A264149(n) = denominator(SGGS(n)).
A001163(n) = numerator(SGGS(2*n)) = numerator(SGGS(2*n)/2^(n+1)).
A001164(n) = denominator(SGGS(2*n)).
A090804(n) = numerator(SGGS(2*n+1)).
A065973(n) = denominator(SGGS(2*n+1)) = denominator(SGGS(2*n+1)/2^(n+1)).
A005447(n+1) = numerator(SGGS(n)/2^(n+1)).
A264150(n) = numerator(SGGS(2*n+1)/2^(n+1)).
KEYWORD
sign,frac
AUTHOR
Peter Luschny, Nov 05 2015
STATUS
approved
Numerators of an asymptotic series for the Gamma function (even power series).
+10
5
1, -1, 19, -2561, 874831, -319094777, 47095708213409, -751163826506551, 281559662236405100437, -49061598325832137241324057, 5012066724315488368700829665081, -26602063280041700132088988446735433, 40762630349420684160007591156102493590477
OFFSET
0,3
COMMENTS
Let y = x+1/2 then Gamma(x+1) ~ sqrt(2*Pi)*((y/E)*Sum_{k>=0} r(k)/y^(2*k))^y as x -> oo and r(k) = A277000(k)/A277001(k) (see example 6.1 in the Wang reference).
FORMULA
a(n) = numerator(b(2*n)) with b(n) = Y_{n}(0, z_2, z_3,..., z_n)/n! with z_k = k!*Bernoulli(k,1/2)/(k*(k-1)) and Y_{n} the complete Bell polynomials.
The rational numbers have the recurrence r(n) = (1/(2*n))*Sum_{m=0..n-1} Bernoulli(2*m+2,1/2)*r(n-m-1)/(2*m+1)) for n>=1, r(0)=1. - Peter Luschny, Sep 30 2016
EXAMPLE
The underlying rational sequence starts:
1, 0, -1/24, 0, 19/5760, 0, -2561/2903040, 0, 874831/1393459200, 0, ...
MAPLE
b := n -> CompleteBellB(n, 0, seq((k-2)!*bernoulli(k, 1/2), k=2..n))/n!:
A277000 := n -> numer(b(2*n)): seq(A277000(n), n=0..12);
# Alternatively the rational sequence by recurrence:
R := proc(n) option remember; local k; `if`(n=0, 1,
add(bernoulli(2*m+2, 1/2)* R(n-m-1)/(2*m+1), m=0..n-1)/(2*n)) end:
seq(numer(R(n)), n=0..12); # Peter Luschny, Sep 30 2016
MATHEMATICA
CompleteBellB[n_, zz_] := Sum[BellY[n, k, zz[[1 ;; n-k+1]]], {k, 1, n}];
b[n_] := CompleteBellB[n, Join[{0}, Table[(k-2)! BernoulliB[k, 1/2], {k, 2, n}]]]/n!;
a[n_] := Numerator[b[2n]];
Table[a[n], {n, 0, 12}] (* Jean-François Alcover, Sep 09 2018 *)
CROSSREFS
Cf. A001163/A001164 (Stirling), A182935/A144618 (De Moivre), A005146/A005147 (Stieltjes), A090674/A090675 (Lanczos), A181855/A181856 (Nemes), A182912/A182913 (NemesG), A182916/A182917 (Wehmeier), A182919/A182920 (Gosper), A182914/A182915, A277002/A277003 (odd power series).
Cf. A276667/A276668 (the arguments of the Bell polynomials).
KEYWORD
sign,frac
AUTHOR
Peter Luschny, Sep 25 2016
STATUS
approved
Number of decimal digits in (n!)!; A000197.
+10
3
1, 1, 1, 3, 24, 199, 1747, 16474, 168187, 1859934, 22228104, 286078171, 3949867548, 58284826485, 915905054360, 15276520209206, 269617872744249, 5021159048900643, 98417586560408168, 2025488254833817394, 43675043585825292775, 984729344827900257489, 23172929656443132617906
OFFSET
0,4
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 0..448 (first 100 terms from Robert G. Wilson v)
Eric Weisstein's World of Mathematics, Factorial
MAPLE
seq(length((n)!!), n=0..19); # Zerinvary Lajos, Mar 10 2007
MATHEMATICA
LogBase10Stirling[n_] := Floor[ Log[10, 2 Pi n]/2 + n*Log[10, n/E] + Log[10, 1 + 1/(12n) + 1/(288n^2) - 139/(51840n^3) - 571/(2488320n^4) + 163879/(209018880n^5) + 5246819/(75246796800n^6)]]; (* A001163/A001164; good to at least a(1000) *) LogBase10Stirling[0] = LogBase10Stirling[1] = 0; Table[1 + LogBase10Stirling[n!], {n, 0, 101}] (* Robert G. Wilson v, Aug 05 2015 *)
PROG
(PARI) \\ Using 100 digits of precision.
a(n)=localprec(100); my(t=n!); return(floor((t*log(t)-t+1/2*log(2*Pi*t)+1/(12*t))/log(10)+1))\\ Robert Gerbicz, Jul 08 2008
(Magma) // Using about 100 more digits of precision than needed.
nMax:=30; SetDefaultRealField(RealField(Ceiling(Log(10, Factorial(nMax))+100))); a:=[]; for n in [0..nMax] do a[n+1]:=1+Floor(LogGamma(Factorial(n)+1)/Log(10)); end for; a; // Jon E. Schoenfield, Aug 07 2015
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Sep 05 2001
EXTENSIONS
More terms from Vladeta Jovovic, Sep 06 2001
A correspondent reported that terms a(17) - a(19) shown here were wrong. That's not true, they are correct. The correspondent was using Python, where the default precision was not large enough to calculate these terms correctly. Thanks to Brendan McKay, Max Alekseyev and Robert Gerbicz for confirming the entries. - N. J. A. Sloane, Jul 08 2008
a(20) from Brendan McKay, Jul 08 2008
a(21)-a(22) from Hugo Pfoertner, Nov 25 2023
STATUS
approved
Numerators of an asymptotic series for the Gamma function (G. Nemes)
+10
3
1, 0, 1, -1, -257, -53, 5741173, 37529, -710165119, -3376971533, 360182239526821, 104939254406053, -508096766056991140541, -70637580369737593, 289375690552473442964467, 796424971106808496421869
OFFSET
0,5
COMMENTS
G_n = A182912(n)/A182913(n). These rational numbers provide the coefficients for an asymptotic expansion of the Gamma function.
REFERENCES
G. Nemes, More Accurate Approximations for the Gamma Function, Thai Journal of Mathematics Volume 9(1) (2011), 21-28.
FORMULA
Gamma(x+1) ~ x^x e^(-x) sqrt(2Pi(x+1/6)) Sum_{n>=0} G_n / (x+1/4)^n.
EXAMPLE
G_0 = 1, G_1 = 0, G_2 = 1/144, G_3 = -1/12960.
MAPLE
G := proc(n) option remember; local j, J;
J := proc(k) option remember; local j; `if`(k=0, 1,
(J(k-1)/k-add((J(k-j)*J(j))/(j+1), j=1..k-1))/(1+1/(k+1))) end:
add(J(2*j)*2^j*6^(j-n)*GAMMA(1/2+j)/(GAMMA(n-j+1)*GAMMA(1/2+j-n)), j=0..n)-add(G(j)*(-4)^(j-n)*(GAMMA(n)/(GAMMA(n-j+1)*GAMMA(j))), j=1..n-1) end:
A182912 := n -> numer(G(n)); seq(A182912(i), i=0..15);
MATHEMATICA
G[n_] := G[n] = Module[{j, J}, J[k_] := J[k] = Module[{j}, If[k == 0, 1, (J[k-1]/k - Sum[J[k-j]*J[j]/(j+1), {j, 1, k-1}])/(1+1/(k+1))]]; Sum[J[2*j]*2^j*6^(j-n)*Gamma[1/2+j]/(Gamma[n-j+1]*Gamma[1/2+j-n]), {j, 0, n}] - Sum[G[j]*(-4)^(j-n)*Gamma[n]/(Gamma[n-j+1]*Gamma[j]), {j, 1, n-1}]]; A182912[n_] := Numerator[G[n]]; Table[A182912[i], {i, 0, 15}] (* Jean-François Alcover, Jan 06 2014, translated from Maple *)
CROSSREFS
KEYWORD
sign,frac
AUTHOR
Peter Luschny, Feb 09 2011
STATUS
approved

Search completed in 0.021 seconds