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-5 of 5 results.

A332748 The number of permutations of {1,1,1,2,2,2,...,n,n,n} such that each triple of k's (k=1..n) is equally spaced with b(k) other elements in between and b(1) >= b(2) >= ... >= b(n).

Original entry on oeis.org

1, 1, 4, 18, 124, 738, 7464, 55890, 668778, 7030210, 90713844, 1054221258, 18597735744, 242795838520
Offset: 0

Views

Author

Seiichi Manyama, Feb 21 2020

Keywords

Examples

			n = 1 case:
     |           | b(1)
-----+-----------+------
   1 | [1, 1, 1] | [0] *
.
n = 2 case:
     |                    | b(1),b(2)
-----+--------------------+----------
   1 | [2, 2, 2, 1, 1, 1] | [0, 0]
   2 | [2, 1, 2, 1, 2, 1] | [1, 1]
   3 | [1, 2, 1, 2, 1, 2] | [1, 1]
   4 | [1, 1, 1, 2, 2, 2] | [0, 0]
.
n = 3 case:
     |                             | b(1),b(2),b(3)
-----+-----------------------------+---------------
   1 | [3, 3, 3, 2, 2, 2, 1, 1, 1] | [0, 0, 0]
   2 | [3, 3, 3, 2, 1, 2, 1, 2, 1] | [1, 1, 0]
   3 | [3, 3, 3, 1, 2, 1, 2, 1, 2] | [1, 1, 0]
   4 | [3, 3, 3, 1, 1, 1, 2, 2, 2] | [0, 0, 0]
   5 | [3, 2, 1, 3, 2, 1, 3, 2, 1] | [2, 2, 2]
   6 | [3, 1, 2, 3, 1, 2, 3, 1, 2] | [2, 2, 2]
   7 | [1, 3, 3, 3, 1, 2, 2, 2, 1] | [3, 0, 0]
   8 | [2, 3, 1, 2, 3, 1, 2, 3, 1] | [2, 2, 2]
   9 | [1, 3, 2, 1, 3, 2, 1, 3, 2] | [2, 2, 2]
  10 | [2, 1, 3, 2, 1, 3, 2, 1, 3] | [2, 2, 2]
  11 | [1, 2, 3, 1, 2, 3, 1, 2, 3] | [2, 2, 2]
  12 | [2, 2, 2, 3, 3, 3, 1, 1, 1] | [0, 0, 0]
  13 | [1, 1, 1, 3, 3, 3, 2, 2, 2] | [0, 0, 0]
  14 | [1, 2, 2, 2, 1, 3, 3, 3, 1] | [3, 0, 0]
  15 | [2, 2, 2, 1, 1, 1, 3, 3, 3] | [0, 0, 0]
  16 | [2, 1, 2, 1, 2, 1, 3, 3, 3] | [1, 1, 0]
  17 | [1, 2, 1, 2, 1, 2, 3, 3, 3] | [1, 1, 0]
  18 | [1, 1, 1, 2, 2, 2, 3, 3, 3] | [0, 0, 0]
* (strongly decreasing)
		

Crossrefs

Column k=3 of A332762.
Cf. A104429, A059108, A261516 (strongly decreasing), A322178, A332752.

Extensions

a(10)-a(13) from Max Alekseyev, Sep 26 2023

A332752 The number of permutations of {1,1,1,1,2,2,2,2,...,n,n,n,n} such that each quadruple of k's (k=1..n) is equally spaced with b(k) other elements in between, and b(1) >= b(2) >= ... >= b(n).

Original entry on oeis.org

1, 1, 4, 16, 110, 544, 5444, 32520, 385776, 3282108, 40916528, 354328560, 7200045216, 67347823160, 1182323197504, 18086875471594, 358787259407482, 4564034487662420
Offset: 0

Views

Author

Seiichi Manyama, Feb 22 2020

Keywords

Examples

			In case of n = 1.
     |              | b(1)
-----+--------------+------
   1 | [1, 1, 1, 1] | [0] *
In case of n = 2.
     |                          | b(1),b(2)
-----+--------------------------+----------
   1 | [2, 2, 2, 2, 1, 1, 1, 1] | [0, 0]
   2 | [2, 1, 2, 1, 2, 1, 2, 1] | [1, 1]
   3 | [1, 2, 1, 2, 1, 2, 1, 2] | [1, 1]
   4 | [1, 1, 1, 1, 2, 2, 2, 2] | [0, 0]
In case of n = 3.
     |                                      | b(1),b(2),b(3)
-----+--------------------------------------+---------------
   1 | [3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1] | [0, 0, 0]
   2 | [3, 3, 3, 3, 2, 1, 2, 1, 2, 1, 2, 1] | [1, 1, 0]
   3 | [3, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 2] | [1, 1, 0]
   4 | [3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2] | [0, 0, 0]
   5 | [3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1] | [2, 2, 2]
   6 | [3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2] | [2, 2, 2]
   7 | [2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1] | [2, 2, 2]
   8 | [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2] | [2, 2, 2]
   9 | [2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3] | [2, 2, 2]
  10 | [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3] | [2, 2, 2]
  11 | [2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 1, 1] | [0, 0, 0]
  12 | [1, 1, 1, 1, 3, 3, 3, 3, 2, 2, 2, 2] | [0, 0, 0]
  13 | [2, 2, 2, 2, 1, 1, 1, 1, 3, 3, 3, 3] | [0, 0, 0]
  14 | [2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 3, 3] | [1, 1, 0]
  15 | [1, 2, 1, 2, 1, 2, 1, 2, 3, 3, 3, 3] | [1, 1, 0]
  16 | [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3] | [0, 0, 0]
* (strongly decreasing)
		

Crossrefs

Column 4 of A332762.
Cf. A104430, A261517 (strongly decreasing), A285698, A322178, A332748, A332773, A332783, A332784.

Extensions

a(10)-a(17) from Max Alekseyev, Sep 27 2023

A332783 The number of permutations of {(n+1) 1's, (n+1) 2's, ..., (n+1) n's} with the property that k's are equally spaced for k=1..n and the interval of k+1 is less than or equal to the interval of k for k=1..n-1.

Original entry on oeis.org

1, 4, 16, 104, 484, 4848, 25104, 300336, 2335296, 27953952, 198725952, 4731323904, 33020828928, 606237831936, 8936541384192, 174694058933760, 1628654065588224, 56338295740213248, 545177455792662528, 20766878061520306176, 340162958990367645696
Offset: 1

Views

Author

Seiichi Manyama, Feb 23 2020

Keywords

Examples

			Define the interval of k as b(k).
In case of n = 1.
     |        | b(1)
-----+--------+-----
   1 | [1, 1] | [0]
In case of n = 2.
     |                    | b(1),b(2)
-----+--------------------+----------
   1 | [2, 2, 2, 1, 1, 1] | [0, 0]
   2 | [2, 1, 2, 1, 2, 1] | [1, 1]
   3 | [1, 2, 1, 2, 1, 2] | [1, 1]
   4 | [1, 1, 1, 2, 2, 2] | [0, 0]
In case of n = 3.
     |                                      | b(1),b(2),b(3)
-----+--------------------------------------+---------------
   1 | [3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1] | [0, 0, 0]
   2 | [3, 3, 3, 3, 2, 1, 2, 1, 2, 1, 2, 1] | [1, 1, 0]
   3 | [3, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 2] | [1, 1, 0]
   4 | [3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2] | [0, 0, 0]
   5 | [3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1] | [2, 2, 2]
   6 | [3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2] | [2, 2, 2]
   7 | [2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1] | [2, 2, 2]
   8 | [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2] | [2, 2, 2]
   9 | [2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3] | [2, 2, 2]
  10 | [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3] | [2, 2, 2]
  11 | [2, 2, 2, 2, 3, 3, 3, 3, 1, 1, 1, 1] | [0, 0, 0]
  12 | [1, 1, 1, 1, 3, 3, 3, 3, 2, 2, 2, 2] | [0, 0, 0]
  13 | [2, 2, 2, 2, 1, 1, 1, 1, 3, 3, 3, 3] | [0, 0, 0]
  14 | [2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 3, 3] | [1, 1, 0]
  15 | [1, 2, 1, 2, 1, 2, 1, 2, 3, 3, 3, 3] | [1, 1, 0]
  16 | [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3] | [0, 0, 0]
		

Crossrefs

Programs

  • Ruby
    def search(a, num, d, k, n)
      if num == 0
        @cnt += 1
      else
        (k * n - k + 1).times{|i|
          if a[i] == 0
            (i + d + 1..k * n - k + 1).each{|j|
              if (k - 1) * j - (k - 2) * i < k * n
                if (1..k - 1).all?{|m| a[m * j - (m - 1) * i] == 0}
                  (0..k - 1).each{|m| a[m * j - (m - 1) * i] = num}
                  search(a, num - 1, j - i - 1, k, n)
                  (0..k - 1).each{|m| a[m * j - (m - 1) * i] = 0}
                end
              end
            }
          end
        }
      end
    end
    def A(k, n)
      a = [0] * k * n
      @cnt = 0
      search(a, n, 0, k, n)
      @cnt
    end
    def A332783(n)
      (1..n).map{|i| A(i + 1, i)}
    end
    p A332783(5)

Extensions

a(9)-a(17) from Bert Dobbelaere, Mar 08 2020
a(18)-a(21) from Max Alekseyev, Sep 26 2023

A332773 The number of permutations of {1,1,1,1,1,2,2,2,2,2,...,n,n,n,n,n} with the property that b(1) >= b(2) >= ... >= b(n), where five k's are skipped by b(k) for k=1..n.

Original entry on oeis.org

1, 1, 4, 16, 104, 508, 5136, 28224, 333360, 2793888, 34010208, 276522240, 5903380896, 50068045536, 892740867024, 13555604385504, 260760485969664, 3084227796562768, 91112167715233008, 1145087508241888160
Offset: 0

Views

Author

Seiichi Manyama, Feb 24 2020

Keywords

Examples

			In case of n = 1.
     |                 | b(1)
-----+-----------------+-----
   1 | [1, 1, 1, 1, 1] | [0]
In case of n = 2.
     |                                | b(1),b(2)
-----+--------------------------------+----------
   1 | [2, 2, 2, 2, 2, 1, 1, 1, 1, 1] | [0, 0]
   2 | [2, 1, 2, 1, 2, 1, 2, 1, 2, 1] | [1, 1]
   3 | [1, 2, 1, 2, 1, 2, 1, 2, 1, 2] | [1, 1]
   4 | [1, 1, 1, 1, 1, 2, 2, 2, 2, 2] | [0, 0]
In case of n = 3.
     |                                               | b(1),b(2),b(3)
-----+-----------------------------------------------+---------------
   1 | [3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1] | [0, 0, 0]
   2 | [3, 3, 3, 3, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1] | [1, 1, 0]
   3 | [3, 3, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2] | [1, 1, 0]
   4 | [3, 3, 3, 3, 3, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2] | [0, 0, 0]
   5 | [3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1] | [2, 2, 2]
   6 | [3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2] | [2, 2, 2]
   7 | [2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1] | [2, 2, 2]
   8 | [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2] | [2, 2, 2]
   9 | [2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3] | [2, 2, 2]
  10 | [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3] | [2, 2, 2]
  11 | [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1] | [0, 0, 0]
  12 | [1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2] | [0, 0, 0]
  13 | [2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3] | [0, 0, 0]
  14 | [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 3, 3, 3, 3] | [1, 1, 0]
  15 | [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 3, 3, 3, 3] | [1, 1, 0]
  16 | [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3] | [0, 0, 0]
		

Crossrefs

Extensions

a(10)-a(19) from Max Alekseyev, Sep 26 2023

A332784 The number of permutations of {n 1's, n 2's,...,n n's} with the property that b(1) >= b(2) >= ... >= b(n), where n k's are skipped by b(k) for k=1..n.

Original entry on oeis.org

5, 18, 110, 508, 4968, 25824, 305376, 2375616, 28316832, 202354752, 4771240704, 33499830528, 612464852736, 9023719675392, 176001733301760, 1649576855476224, 56693983168309248, 551579829498390528, 20888523161929138176, 342595860998544285696
Offset: 2

Views

Author

Seiichi Manyama, Feb 23 2020

Keywords

Examples

			In case of n = 2.
     |              | b(1),b(2)
-----+--------------+----------
   1 | [2, 2, 1, 1] | [0, 0]
   2 | [2, 1, 2, 1] | [1, 1]
   3 | [1, 2, 2, 1] | [2, 0]
   4 | [1, 2, 1, 2] | [1, 1]
   5 | [1, 1, 2, 2] | [0, 0]
In case of n = 3.
     |                             | b(1),b(2),b(3)
-----+-----------------------------+---------------
   1 | [3, 3, 3, 2, 2, 2, 1, 1, 1] | [0, 0, 0]
   2 | [3, 3, 3, 2, 1, 2, 1, 2, 1] | [1, 1, 0]
   3 | [3, 3, 3, 1, 2, 1, 2, 1, 2] | [1, 1, 0]
   4 | [3, 3, 3, 1, 1, 1, 2, 2, 2] | [0, 0, 0]
   5 | [3, 2, 1, 3, 2, 1, 3, 2, 1] | [2, 2, 2]
   6 | [3, 1, 2, 3, 1, 2, 3, 1, 2] | [2, 2, 2]
   7 | [1, 3, 3, 3, 1, 2, 2, 2, 1] | [3, 0, 0]
   8 | [2, 3, 1, 2, 3, 1, 2, 3, 1] | [2, 2, 2]
   9 | [1, 3, 2, 1, 3, 2, 1, 3, 2] | [2, 2, 2]
  10 | [2, 1, 3, 2, 1, 3, 2, 1, 3] | [2, 2, 2]
  11 | [1, 2, 3, 1, 2, 3, 1, 2, 3] | [2, 2, 2]
  12 | [2, 2, 2, 3, 3, 3, 1, 1, 1] | [0, 0, 0]
  13 | [1, 1, 1, 3, 3, 3, 2, 2, 2] | [0, 0, 0]
  14 | [1, 2, 2, 2, 1, 3, 3, 3, 1] | [3, 0, 0]
  15 | [2, 2, 2, 1, 1, 1, 3, 3, 3] | [0, 0, 0]
  16 | [2, 1, 2, 1, 2, 1, 3, 3, 3] | [1, 1, 0]
  17 | [1, 2, 1, 2, 1, 2, 3, 3, 3] | [1, 1, 0]
  18 | [1, 1, 1, 2, 2, 2, 3, 3, 3] | [0, 0, 0]
		

Crossrefs

Formula

Conjecture: a(n) = A332783(n) + (n-1)!.

Extensions

a(9)-a(17) from Bert Dobbelaere, Mar 08 2020
a(18)-a(21) from Max Alekseyev, Sep 26 2023
Showing 1-5 of 5 results.