ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 04 Sep 2018 03:45:31 +0200How to get a list of the combinations such that the elements are equal to some $n$https://ask.sagemath.org/question/43570/how-to-get-a-list-of-the-combinations-such-that-the-elements-are-equal-to-some-n/ I want a generalization of this kind
`[(r1, ..., rk) for r1 in range(n+1) ... for rk in range(n+1) if r1 + ... + rk = n]`
For a general number of $r$'s and any $n$MarioMTue, 04 Sep 2018 03:45:31 +0200https://ask.sagemath.org/question/43570/