I have some simple counting problems, for example, how many n-ary k-tuples, i.e. $(v_0,v_1,\ldots, v_k)$ with $0\le v_i < n$, are there which have $v_0=1$, and $m$ non-zero coordinates.
What sort of functionality is there is Sage or other computer algebra systems for answering such questions for general $n,k$ and $m$?