Ask Your Question
0

How to define this polynomial?

asked 2018-10-24 15:48:34 -0600

GoGoKo gravatar image

updated 2018-11-04 12:50:58 -0600

slelievre gravatar image

$ h_i(x_1,\ldots,x_n) = \sum_{j_1+\cdots+j_n=i} \;\prod_{k=1}^n x_k^{j_k}$

I think I need a Partitions(i) to do it but I need some $j_k$ to be zero, then I tried PartitionTuples(level=n,size=i), and it still doesn't work.

edit retag flag offensive close merge delete

Comments

1

Could you please provide your code ?

tmonteil gravatar imagetmonteil ( 2018-10-24 15:51:12 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2018-10-25 10:18:02 -0600

FrédéricC gravatar image

Use something like that

sage: [v for v in IntegerVectors(n=4,k=3)]
[[4, 0, 0],
 [3, 1, 0],
 [3, 0, 1],
 [2, 2, 0],
 [2, 1, 1],
 [2, 0, 2],
 [1, 3, 0],
 [1, 2, 1],
 [1, 1, 2],
 [1, 0, 3],
 [0, 4, 0],
 [0, 3, 1],
 [0, 2, 2],
 [0, 1, 3],
 [0, 0, 4]]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-24 15:48:34 -0600

Seen: 85 times

Last updated: Nov 04