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.

Showing 1-6 of 6 results.

A249615 Number of non-singleton blocks in the n-th set partition (A231428).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2
Offset: 0

Views

Author

Tilman Piesk, Nov 02 2014

Keywords

Examples

			The 6th set partition has 2 non-singleton blocks {1,4} and {2,3}. So a(6) = 2.
		

Crossrefs

A249616 Number of elements in non-singleton blocks in the n-th set partition (A231428).

Original entry on oeis.org

0, 2, 2, 2, 3, 2, 4, 2, 4, 3, 2, 4, 3, 3, 4, 2, 4, 4, 4, 5, 2, 4, 4, 4, 5, 3, 5, 2, 4, 4, 4, 5, 3, 5, 3, 5, 4, 2, 4, 4, 4, 5, 3, 5, 3, 5, 4, 3, 5, 4, 4, 5, 2, 4, 4, 4, 5, 4, 6, 4, 6, 5, 4, 6, 5, 5, 6, 2, 4, 4, 4, 5, 4, 6, 4, 6, 5, 4, 6, 5, 5, 6
Offset: 0

Views

Author

Tilman Piesk, Nov 02 2014

Keywords

Examples

			The 6th set partition has the non-singleton blocks {1,4} and {2,3}, and they contain 4 elements. So a(6) = 4.
		

Crossrefs

A249617 Integer partition (A194602) of the n-th set partition (A231428).

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 3, 2, 1, 3, 2, 2, 4, 1, 3, 3, 3, 5, 1, 3, 3, 3, 5, 2, 5, 1, 3, 3, 3, 5, 2, 5, 2, 5, 4, 1, 3, 3, 3, 5, 2, 5, 2, 5, 4, 2, 5, 4, 4, 6, 1, 3, 3, 3, 5, 3, 7, 3, 7, 5, 3, 7, 5, 5, 8, 1, 3, 3, 3, 5, 3, 7, 3, 7, 5, 3, 7, 5, 5, 8
Offset: 0

Views

Author

Tilman Piesk, Nov 02 2014

Keywords

Examples

			The 6th set partition has 2 non-singleton blocks {1,4} and {2,3}, each with 2 elements. This corresponds to the integer partition 2+2, which is the 3rd in the infinite order defined by A194602. So a(6) = 3.
		

A249618 Set partition (A231428) corresponding to the n-th finite permutation (A055089).

Original entry on oeis.org

0, 1, 3, 4, 4, 2, 10, 11, 13, 14, 14, 12, 13, 14, 7, 9, 8, 14, 14, 12, 9, 5, 14, 6, 37, 38, 40, 41, 41, 39, 47, 48, 50
Offset: 0

Views

Author

Tilman Piesk, Nov 02 2014

Keywords

Examples

			The 23rd permutation is (1 4)(2 3) in cycle notation, and the corresponding set partition is {{1,4},{2,3}}, which is the 6th in the infinite order defined by A231428. So a(23) = 6.
		

A261195 Encoded symmetrical square binary matrices.

Original entry on oeis.org

0, 1, 6, 7, 16, 17, 22, 23, 40, 41, 46, 47, 56, 57, 62, 63, 384, 385, 390, 391, 400, 401, 406, 407, 424, 425, 430, 431, 440, 441, 446, 447, 576, 577, 582, 583, 592, 593, 598, 599, 616, 617, 622, 623, 632, 633, 638, 639, 960, 961, 966, 967, 976, 977, 982, 983
Offset: 0

Views

Author

Philippe Beaudoin, Aug 11 2015

Keywords

Comments

We encode an n X n binary matrix reading it antidiagonal by antidiagonal, starting from the least significant bit. A given entry in the sequence therefore represents the infinite family of n X n matrices that can be obtained by adding zero antidiagonals. All of these matrices are symmetrical. This encoding makes it possible to obtain a sequence rather than a table.

Examples

			391 = 0b110000111 encodes all square matrices with the first four antidiagonals equal to ((1), (1, 1), (0, 0, 0), (0, 1, 1, 0)), for example, the 3 X 3 matrix:
  1 1 0
  1 0 1
  0 1 0
and the 4 X 4 matrix:
  1 1 0 0
  1 0 1 0
  0 1 0 0
  0 0 0 0
and all larger square matrices constructed in the same way. Since 391 is in the sequence, all these matrices are symmetrical.
		

Crossrefs

Programs

  • Mathematica
    b[n_] := Select[ Tuples[{0, 1}, n], # == Reverse@ # &]; FromDigits[#, 2]& /@ Join @@@ Tuples[ b/@ Range[7, 1, -1]] (* Giovanni Resta, Aug 12 2015 *)

Formula

a((2n+1)*2^(k-1)) = a(n*2^k) + a(2^(k-1)) for n >= 0 and k >= 1. - Eric Werley, Sep 13 2015

A261194 Encoded square binary matrices representing an idempotent relation.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 16, 17, 18, 19, 20, 21, 23, 25, 27, 33, 37, 49, 53, 65, 67, 73, 75, 81, 83, 89, 91, 141, 144, 145, 148, 149, 153, 154, 155, 157, 159, 181, 209, 217, 219, 272, 273, 274, 275, 283, 291, 305, 307, 308, 309, 311, 337, 339, 347, 513, 517, 529
Offset: 0

Views

Author

Philippe Beaudoin, Aug 11 2015

Keywords

Comments

We encode an n X n binary matrix reading it antidiagonal by antidiagonal, starting from the least significant bit. A given entry in the sequence therefore represents the infinite family of n X n matrices that can be obtained by adding zero antidiagonals. All of these matrices represent idempotent relations. This encoding makes it possible to obtain a sequence rather than a table.

Examples

			For example, 148 = 0b10010100 encodes all square matrices with the first four antidiagonals equal to ((0), (0, 1), (0, 1, 0), (0, 1, 0, 0)). For example the 3 X 3 matrix:
  0 1 0
  0 1 0
  0 1 0
and the 4 X 4 matrix:
  0 1 0 0
  0 1 0 0
  0 1 0 0
  0 0 0 0
and all larger square matrices constructed in the same way. Since 148 is in the sequence, all these matrices are idempotent.
		

Crossrefs

Programs

  • Python
    def getBitIndex(i, j):
      return (i+j)*(i+j+1)//2 + j
    def getBit(mat, i, j):
      return (mat >> getBitIndex(i, j)) & 1
    def setBit(mat, i, j):
      return mat | (1 << getBitIndex(i, j))
    def noBitLeft(mat, i, j):
      return mat >> getBitIndex(i, j) == 0
    def squarematrix(mat):
      result = 0;
      i = 0
      while True:
        if noBitLeft(mat, i, 0):
          return result
        j = 0;
        while True:
          if noBitLeft(mat, 0, j):
            break
          k = 0
          while True:
            if noBitLeft(mat, i, k):
              break
            if getBit(mat, i, k) & getBit(mat, k, j):
              result = setBit(result, i, j)
              break
            k += 1
          j += 1
        i += 1
      return result
    index = 0
    mat = 0
    while True:
      if mat == squarematrix(mat):
        print(index, mat)
        index += 1
      mat += 1
Showing 1-6 of 6 results.