MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: a curious answer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69127] Re: [mg69055] a curious answer
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Wed, 30 Aug 2006 06:35:08 -0400 (EDT)
  • References: <200608290725.DAA28971@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

from the help:

"CoefficientList[poly, var] gives a list of coefficients of powers of
var in poly, starting with power 0."

"Terms that do not contain positive integer powers of a particular
variable are included in the first element of the list for that
variable."

Though I will say that CoefficientList[0,x] returning {} instead of
{0} is appalling to me.

On 8/29/06, rick <awass at umich.edu> wrote:
> Hi,
>
> Can anyone explain these answers (Out[5] and Out[6])?
>
> Line 1 defines a polynomial in x that depends on n;
> line 2 tests the definition when n= 4;
> line 3 lists the coefficients of that polynomial and
> line 4 checks the list when n= 4; lines 5 and 6 ask for a closed form
> for the polynomial and coefficients (which is probably not possible). I
> expected no answer-not gibberish.
>
> In[1]:=
> k[n_]:=Expand[Product[(j*x+n-j),{j,1,n-1}]]
>
> In[2]:=
> k[4]
>
> Out[2]=
> \!\(6 + 26\ x + 26\ x\^2 + 6\ x\^3\)
>
> In[3]:=
> cL[s_]:=CoefficientList[k[s],x]
>
>
> In[4]:=
> cL[4]
>
> Out[4]=
> {6,26,26,6}
>
> In[5]:=
> cL[n]
>
> Out[5]=
> \!\({\(-\((\(-1\))\)\^n\)\ n\^\(\(-1\) + n\)\ \(\((\(-1\) + n)\)!\)}\)
>
> In[6]:=
> k[n]
>
> Out[6]=
> \!\(\(-\((\(-1\))\)\^n\)\ n\^\(\(-1\) + n\)\ \(\((\(-1\) + n)\)!\)\)
>
>
> Thanks,
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: generalized foldlist problem
  • Next by Date: Re: generalized foldlist problem
  • Previous by thread: a curious answer
  • Next by thread: Re: a curious answer