Re: Math 480 Hw #7

2 views
Skip to first unread message

William Stein

unread,
May 20, 2009, 9:02:39 PM5/20/09
to Christopher Zwach, 480-uw09
On Wed, May 20, 2009 at 4:18 PM, Christopher Zwach
<sib...@u.washington.edu> wrote:
> Hey Professor Stein,
> I was finishing up the Combinatorics homework for 480 but I keep running
> into a problem with the infinite sum/product for problem number 2.  I'm
> using the maxima function as outlined previously during the calc section,
> but I keep getting a Lisp error.
>
> Here's my code:
> S = SR(sage.calculus.calculus.maxima('sum(Partitions(i).cardinality()*(x^i),
> i,0,inf), simpsum'))
> P = SR(sage.calculus.calculus.maxima('prod((1/(1-(x^i))),i,1,inf),
> simpsum'))
>
> Any suggestions?
> Thanks!

Here is how to get 15 terms of the expansion of the infinite product
directly in sage:

R.<x> = QQ[[]]
prod(1/(1-x^k+O(x^15)) for k in [1..15])

-- William

Reply all
Reply to author
Forward
0 new messages