sage code to find sum of each combination of NcR
Ex :sage:Combinations([1,2,3,4,5],3).list() This will give a listing as follows
1,2,3
1,2,4
1,2,5
1,3,4
1,3,5
1,4,5
2,3,4
2,3,5
2,4,5
3,4,5
How to get a listing to include the sum of each combination alongside as follows
1,2,3 6
1,2,4 7
and so on My email id is : itsverma4u2@gmail.com
add a comment