login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268532
Decimal representation of permutations of lengths 1, 2, 3, ... arranged first by number of inversions and then lexicographically.
1
1, 12, 21, 123, 132, 213, 231, 312, 321, 1234, 1243, 1324, 2134, 1342, 1423, 2143, 2314, 3124, 1432, 2341, 2413, 3142, 3214, 4123, 2431, 3241, 3412, 4132, 4213, 3421, 4231, 4312, 4321, 12345, 12354, 12435, 13245, 21345, 12453
OFFSET
1,2
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..5913
David Consiglio, Jr., Python Program
EXAMPLE
The 24 permutations of length 4 and their numbers of inversions:
1234 0
1243 1
1324 1
2134 1
1342 2
1423 2
2143 2
2314 2
3124 2
1432 3
2341 3
2413 3
3142 3
3214 3
4123 3
2431 4
3241 4
3412 4
4132 4
4213 4
3421 5
4231 5
4312 5
4321 6
CROSSREFS
Cf. A000142 (n!), A030299 (in purely lexicographic order), A008302 (number of permutations with k inversions).
Sequence in context: A134514 A030299 A352991 * A260275 A001292 A292523
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Feb 19 2016
STATUS
approved