ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 04 Apr 2017 03:52:09 -0500permutations with propertyhttp://ask.sagemath.org/question/37155/permutations-with-property/ How can I get a list of permutations $\sigma \in \mathfrak{S}_n$ with the property that $\sigma(i) \geq i-1$ for all $i =1, dots, n.$Mon, 03 Apr 2017 15:41:41 -0500http://ask.sagemath.org/question/37155/permutations-with-property/Answer by FrédéricC for <p>How can I get a list of permutations $\sigma \in \mathfrak{S}_n$ with the property that $\sigma(i) \geq i-1$ for all $i =1, dots, n.$</p>
http://ask.sagemath.org/question/37155/permutations-with-property/?answer=37161#post-id-37161Like that
sage: n=4
sage: [sigma for sigma in Permutations(n) if all(sigma(i)>=i-1 for i in range(1,n+1))]Tue, 04 Apr 2017 03:52:09 -0500http://ask.sagemath.org/question/37155/permutations-with-property/?answer=37161#post-id-37161