Bug in SeriesCoefficient in 7.0
- To: mathgroup at smc.vnet.net
- Subject: [mg97991] Bug in SeriesCoefficient in 7.0
- From: "Maxim A. Dubinnyi" <maxim at nmr.ru>
- Date: Fri, 27 Mar 2009 05:36:10 -0500 (EST)
There is an expression to obtain the order Nk[n] of the hyperdeterminant of 2^n matrix (http://en.wikipedia.org/wiki/Hyperdeterminant): Sum[Nk[n] z^n/n!, {n, 0, Infinity}] == Exp[-2z]/(1-z)^2 I'm trying to expand right hand side of this equation to obtain Nk[n] values. First, look for several low-order coefficients: In[1] = Ser = Series[Exp[-2 z]/(1 - z)^2, {z, 0, 9}] Out[1] = 1 + z^2 + (2 z^3)/3 + z^4 + (16 z^5)/15 + (11 z^6)/9 + ( 142 z^7)/105 + (67 z^8)/45 + (4604 z^9)/2835 + O[z^10] Extract Nk[n]: In[2] = Table[n! Coefficient[Ser, z, n], {n, 0, 9}] Out[2] = {1, 0, 2, 4, 24, 128, 880, 6816, 60032, 589312} This is correct. Then I'm trying to get general expression for Nk[n]: In[3] = SeriesCoefficient[Exp[-2 z]/(1 - z)^2, {z, 0, n}] Out[3] = Piecewise[{{(3 + n)/E^2, n >= 0}}, 0] THIS IS ABSOLUTELY WRONG ANSWER. But the correct answer is given by Mathematica 6.0.1: In[1] (Math 6.0.1) = Nk6[n_] = SeriesCoefficient[Exp[-2 z]/(1 - z)^2, {z, 0, n}] Out[1] (Math 6.0.1) = ((2 + n) ((-1)^n 2^(2 + n) E^2 + (3 + n) Gamma[2 + n, -2]))/(E^2 Gamma[3 + n]) In[2] (Math 6.0.1) = Table[n! Nk6[n], {n, 0, 9}] // FunctionExpand Out[2] (Math 6.0.1) = {1, 0, 2, 4, 24, 128, 880, 6816, 60032, 589312} This is again the correct answer. Maxim A. Dubinnyi, Shemiakin-Ovchinnikov Institue of Bioorganic Chemistry, Moscow, Russia