Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Like that

sage: n=4
sage: [sigma for sigma in Permutations(n) if all(sigma(i)>=i-1 for i in range(1,n+1))]