cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-33 of 33 results.

A213059 Subsets of positive integers arranged in canonical order.

Original entry on oeis.org

1, 12, 2, 123, 13, 23, 3, 1234, 124, 134, 234, 14, 24, 34, 4, 12345, 1235, 1245, 1345, 2345, 125, 135, 145, 235, 245, 345, 15, 25, 35, 45, 5, 123456, 12346, 12356, 12456, 13456, 23456, 1236, 1246, 1256, 1346, 1356, 1456, 2346, 2356, 2456, 3456, 126, 136, 146, 156, 236, 246, 256, 346, 356, 456, 16, 26, 36, 46, 56, 6
Offset: 1

Views

Author

N. J. A. Sloane, Jun 03 2012

Keywords

Comments

The order is self-explanatory (or see the Kubo-Vakil paper).
Of course once we reach subsets containing 10 this way of representing subsets by concatenation is unsatisfactory. Still, the sequence serves as a pointer to the Kubo-Vakil paper.
Sort by largest element, then decreasing size, then lexicographically (see Kubo-Vakil paper). - Michael S. Branicky, Jan 12 2021

Crossrefs

Cf. A030299.

Programs

  • Python
    from itertools import chain, combinations as C
    def powerset(s): # in decreasing size
      return chain.from_iterable(C(s, r) for r in range(len(s), -1, -1))
    def agen():
      m = 1 # largest element
      while True:
        for p in powerset(range(1, m)): yield int("".join(map(str, p+(m,))))
        m += 1
    def aupton(terms):
      alst, g = [], agen()
      while len(alst) < terms: alst += [next(g)]
      return alst
    print(aupton(63)) # Michael S. Branicky, Jan 12 2021

Extensions

a(25) corrected by Michael S. Branicky, Jan 12 2021

A268532 Decimal representation of permutations of lengths 1, 2, 3, ... arranged first by number of inversions and then lexicographically.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 19 2016

Keywords

Examples

			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).

A320588 Derangements of {1,2,...,n} (n >= 2) in lexicographic order.

Original entry on oeis.org

21, 231, 312, 2143, 2341, 2413, 3142, 3412, 3421, 4123, 4312, 4321, 21453, 21534, 23154, 23451, 23514, 24153, 24513, 24531, 25134, 25413, 25431, 31254, 31452, 31524, 34152, 34251, 34512, 34521, 35124, 35214, 35412, 35421, 41253, 41523, 41532, 43152, 43251, 43512
Offset: 2

Views

Author

Enrique Navarrete, Nov 14 2018

Keywords

Comments

The number of derangements of {1,2,...,n} is given in A000166.
This sequence is unsatisfactory for n >= 10. To have a sequence that is defined for all n, the derangements should be comma-separated lists, with keyword tabf. - N. J. A. Sloane, Nov 15 2018

Examples

			Triangle begins:
     21;
    231,   312;
   2143,  2341,  2413,  3142,  3412,  3421,  4123,  4312,  4321;
  21453, 21534, 23154, 23451, 23514, 24153, 24513, 24531, 25134, ...
  ...
From _David A. Corneth_, Nov 15 2018: (Start)
43512 is in the sequence because no digit is equal to the index of the digit in the number (with offset 1).
43125 is not in the sequence because 5 is at the fifth position. (End)
		

Crossrefs

Programs

Previous Showing 31-33 of 33 results.