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 11-20 of 20 results.

A328434 Number of inversion sequences of length n avoiding the consecutive patterns 101, 102, 201, and 210.

Original entry on oeis.org

1, 1, 2, 6, 21, 81, 346, 1630, 8350, 45958, 269815, 1681285, 11071336, 76743040, 558062437, 4244853573, 33687390663, 278296576327, 2388351295760, 21254019548162, 195801111412320, 1864508416302520, 18326903140310011, 185711672802101781, 1937795878138303715
Offset: 0

Views

Author

Juan S. Auli, Oct 16 2019

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers such that 0 <= e_i < i. The term a(n) counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i > e_{i+1} != e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 101, 102, 201, and 210.

Examples

			Note that a(4)=21. Indeed, of the 24 inversion sequences of length 4, the only ones that do not avoid the consecutive patterns 101, 102, 201, and 210 are 0101, 0102 and 0103.
		

Crossrefs

Programs

  • Maple
    # after Alois P. Heinz in A328357
    b := proc(n, x, t) option remember; `if`(n=0, 1, add(
           `if`(t and i>x, 0, b(n-1, i, i<>x and x>-1)), i=0..n-1))
         end proc:
    a := n -> b(n, -1, false):
    seq(a(n), n = 0 .. 24);
  • Mathematica
    b[n_, x_, t_] := b[n, x, t] = If[n == 0, 1, Sum[If[t && i > x, 0, b[n - 1, i, i != x && x > -1]], {i, 0, n - 1}]];
    a[n_] := b[n, -1, False];
    a /@ Range[0, 24] (* Jean-François Alcover, Mar 02 2020 after Alois P. Heinz in A328357 *)

A328435 Number of inversion sequences of length n avoiding the consecutive patterns 101, 102, and 201.

Original entry on oeis.org

1, 1, 2, 6, 21, 83, 368, 1814, 9837, 58095, 370499, 2534374, 18493023, 143280489, 1173971656, 10136279104, 91936857611, 873547634921, 8673546319685, 89796095349193, 967384904147690, 10825116242427973, 125613702370667158, 1509222589338456874, 18748890945849736182
Offset: 0

Views

Author

Juan S. Auli, Oct 17 2019

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers such that 0 <= e_i < i. The term a(n) counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i > e_{i+1} < e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 101, 102, and 201.

Examples

			Note that a(4)=21. Indeed, of the 24 inversion sequences of length 4, the only ones that do not avoid the consecutive patterns 101, 102, and 201 are 0101, 0102, and 0103.
		

Crossrefs

Programs

  • Maple
    # after Alois P. Heinz in A328357
    b := proc(n, x, t) option remember; `if`(n = 0, 1, add(
           `if`(t and x < i, 0, b(n - 1, i, i < x)), i = 0 .. n - 1))
         end proc:
    a := n -> b(n, -1, false):
    seq(a(n), n = 0 .. 24);
  • Mathematica
    b[n_, x_, t_] := b[n, x, t] = If[n == 0, 1, Sum[If[t && x < i, 0, b[n - 1, i, i < x]], {i, 0, n - 1}]];
    a[n_] := b[n, -1, False];
    a /@ Range[0, 24] (* Jean-François Alcover, Mar 02 2020 after Alois P. Heinz in A328357 *)

A328436 Number of inversion sequences of length n avoiding the consecutive patterns 000 and 001.

Original entry on oeis.org

1, 1, 2, 3, 9, 37, 190, 1181, 8564, 70914, 659810, 6811371, 77232836, 953969548, 12747856402, 183218649413, 2818050980941, 46182485773217, 803323102085452, 14781372445602234, 286838921699435184, 5854404018902152208, 125367868007259046305, 2810511319383912299122
Offset: 0

Views

Author

Juan S. Auli, Oct 17 2019

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers such that 0 <= e_i < i. The term a(n) counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i = e_{i+1} <= e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 000 and 001.

Examples

			The a(4)=9 length 4 inversion sequences avoiding the consecutive patterns 000 and 001 are 0100, 0110, 0120, 0101, 0121, 0102, 0122, 0103, and 0123.
		

Crossrefs

Programs

  • Maple
    # after Alois P. Heinz in A328357
    b := proc(n, x, t) option remember; `if`(n = 0, 1, add(
           `if`(t and i = x, 0, b(n - 1, i, i <= x)), i = 0 .. n - 1))
         end proc:
    a := n -> b(n, -1, false):
    seq(a(n), n = 0 .. 24);
  • Mathematica
    b[n_, x_, t_] := b[n, x, t] = If[n == 0, 1, Sum[If[t && i == x, 0, b[n - 1, i, i <= x]], {i, 0, n - 1}]];
    a[n_] := b[n, -1, False];
    a /@ Range[0, 24] (* Jean-François Alcover, Mar 02 2020 after Alois P. Heinz in A328357 *)

A328438 Number of inversion sequences of length n avoiding the consecutive patterns 000 and 011.

Original entry on oeis.org

1, 1, 2, 4, 13, 57, 304, 1937, 14315, 120264, 1131896, 11794453, 134774963, 1675630582, 22516745452, 325188337067, 5022796990606, 82620491929333, 1441894214312037, 26609607869036180, 517741915593936360, 10592513721179374467, 227325651424365263577, 5106351205789851629476
Offset: 0

Views

Author

Juan S. Auli, Oct 17 2019

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers such that 0 <= e_i < i. The term a(n) counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i <= e_{i+1} = e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 000 and 011.

Examples

			The a(4)=13 length 4 inversion sequences avoiding the consecutive patterns 000 and 011 are 0100, 0010, 0020, 0120, 0101, 0021, 0121, 0102, 0012, 0103, 0013, 0023, and 0123.
		

Crossrefs

Programs

  • Maple
    # after Alois P. Heinz in A328357
    b := proc(n, x, t) option remember; `if`(n = 0, 1, add(
           `if`(t and i <= x, 0, b(n - 1, i, i = x)), i = 0 .. n - 1))
         end proc:
    a := n -> b(n, -1, false):
    seq(a(n), n = 0 .. 24);
  • Mathematica
    b[n_, x_, t_] := b[n, x, t] = If[n == 0, 1, Sum[If[t && i <= x, 0, b[n - 1, i, i == x]], {i, 0, n - 1}]];
    a[n_] := b[n, -1, False];
    a /@ Range[0, 24] (* Jean-François Alcover, Mar 02 2020 after Alois P. Heinz in A328357 *)

A328440 Number of inversion sequences of length n avoiding the consecutive patterns 000 and 100.

Original entry on oeis.org

1, 1, 2, 5, 18, 81, 448, 2920, 21955, 186981, 1779170, 18706222, 215364181, 2694650157, 36408144034, 528302958022, 8193953571315, 135277259197031, 2368556730208679, 43838335667451773, 855200666797199814, 17538187897491897945, 377199969925672569364, 8489656058119117230574
Offset: 0

Views

Author

Juan S. Auli, Oct 17 2019

Keywords

Comments

A length n inversion sequence e_1e_2...e_n is a sequence of integers such that 0 <= e_i < i. The term a(n) counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i >= e_{i+1} = e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 000 and 100.
The term a(n) also counts the inversion sequences of length n with no entries e_i, e_{i+1}, e_{i+2} such that e_i = e_{i+1} >= e_{i+2}. This is the same as the set of inversion sequences of length n avoiding the consecutive patterns 000 and 110, see the Auli and Elizalde reference.

Examples

			The a(4)=18 length 4 inversion sequences avoiding the consecutive patterns 000 and 100 are 0010, 0110, 0020, 0120, 0101, 0011, 0021, 0121, 0102, 0012, 0112, 0022, 0122, 0103, 0013, 0113, 0023, and 0123.
		

Crossrefs

Programs

  • Maple
    # after Alois P. Heinz in A328357
    b := proc(n, x, t) option remember; `if`(n = 0, 1, add(
           `if`(t and x <= i, 0, b(n - 1, i, i = x)), i = 0 .. n - 1))
         end proc:
    a := n -> b(n, -1, false):
    seq(a(n), n = 0 .. 24);
  • Mathematica
    b[n_, x_, t_] := b[n, x, t] = If[n == 0, 1, Sum[If[t && x <= i, 0, b[n - 1, i, i == x]], {i, 0, n - 1}]];
    a[n_] := b[n, -1, False];
    a /@ Range[0, 24] (* Jean-François Alcover, Mar 02 2020 after Alois P. Heinz in A328357 *)

A328409 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j < k or i <= j >= k.

Original entry on oeis.org

1, 1, 2, 3, 6, 16, 57, 245, 1248, 7151, 46104, 325560, 2523437, 21106494, 190806861, 1842347541, 19018910502, 208088481921, 2414462433024, 29512737830802, 380156646308541, 5133381861786182, 72678441538790901, 1074324277172134786, 16581261996774703606
Offset: 0

Views

Author

Alois P. Heinz, Oct 14 2019

Keywords

Examples

			a(0) = 1: the empty sequence.
a(1) = 1: 0.
a(2) = 2: 00, 01.
a(3) = 3: 000, 010, 011.
a(4) = 6: 0000, 0101, 0102, 0103, 0110, 0111.
a(5) = 16: 00000, 01010, 01011, 01020, 01021, 01022, 01030, 01031, 01032, 01033, 01101, 01102, 01103, 01104, 01110, 01111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j, t, c) option remember; `if`(n=0, 1, add(`if`((i>j
         xor t) and c=0, 0, b(n-1, i, is(i b(n, 0, true, 2):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, j_, t_, c_] := b[n, j, t, c] = If[n == 0, 1, Sum[If[Xor[i>j, t] && c == 0, 0, b[n - 1, i, iJean-François Alcover, Feb 26 2020, after Alois P. Heinz *)

Formula

a(n) ~ n! * c * 2^n * n^(Pi/4 - 1/2) / Pi^n, where c = 0.52096414784... - Vaclav Kotesovec, Oct 31 2019

A328425 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i < j > k or i >= j <= k.

Original entry on oeis.org

1, 1, 2, 4, 11, 36, 142, 647, 3383, 19816, 129162, 923279, 7201951, 60720996, 551268926, 5352973967, 55430433719, 609033864160, 7083303687843, 86864585123112, 1120997775904467, 15176639841694385, 215196709973260722, 3187766448289854016, 49262381105608795771
Offset: 0

Views

Author

Alois P. Heinz, Oct 15 2019

Keywords

Examples

			a(0) = 1: the empty sequence.
a(1) = 1: 0.
a(2) = 2: 00, 01.
a(3) = 4: 000, 001, 002, 010.
a(5) = 11: 0000, 0001, 0002, 0003, 0010, 0020, 0021, 0100, 0101, 0102, 0103.
a(6) = 36: 00000, 00001, 00002, 00003, 00004, 00010, 00020, 00021, 00030, 00031, 00032, 00100, 00101, 00102, 00103, 00104, 00200, 00201, 00202, 00203, 00204, 00211, 00212, 00213, 00214, 01000, 01001, 01002, 01003, 01004, 01010, 01020, 01021, 01030, 01031, 01032.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j, t, c) option remember; `if`(n=0, 1, add(`if`((ij), max(0, c-1))), i=1..n))
        end:
    a:= n-> b(n, 0, true, 2):
    seq(a(n), n=0..24);
  • Mathematica
    b[n_, j_, t_, c_] := b[n, j, t, c] = If[n == 0, 1, Sum[If[Xor[i < j, t] && c == 0, 0, b[n - 1, i, i > j, Max[0, c - 1]]], {i, 1, n}]];
    a[n_] := b[n, 0, True, 2];
    a /@ Range[0, 24] (* Jean-François Alcover, Feb 26 2020, after Alois P. Heinz *)

Formula

a(n) ~ n! * c * 2^n * n^(Pi/4 - 1/2) / Pi^n, where c = 1.60233729528... - Vaclav Kotesovec, Oct 31 2019

A328491 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j <= k or i <= j > k.

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 32, 89, 592, 2402, 19072, 101866, 939136, 6221228, 65291264, 516212409, 6075261184, 55812055946, 727912302592, 7618369901774, 109058247342080, 1280820543489044, 19965414947799040, 259988000952099210, 4383593333171363840, 62680335913868539796
Offset: 0

Views

Author

Alois P. Heinz, Oct 16 2019

Keywords

Examples

			a(0) = 1: the empty sequence.
a(1) = 1: 0.
a(2) = 2: 00, 01.
a(3) = 1: 010.
a(4) = 4: 0100, 0101, 0102, 0103.
a(5) = 6: 01010, 01020, 01021, 01030, 01031, 01032.
a(6) = 32: 010100, 010101, 010102, 010103, 010104, 010105, 010200, 010201, 010202, 010203, 010204, 010205, 010211, 010212, 010213, 010214, 010215, 010300, 010301, 010302, 010303, 010304, 010305, 010311, 010312, 010313, 010314, 010315, 010322, 010323, 010324, 010325.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j, t, c) option remember; `if`(n=0, 1, add(`if`(c=0 and
          (i>j xor t), 0, b(n-1, i, is(i<=j), max(0, c-1))), i=1..n))
        end:
    a:= n-> b(n, 0, true, 2):
    seq(a(n), n=0..27);
  • Mathematica
    b[n_, j_, t_, c_] := b[n, j, t, c] = If[n == 0, 1, Sum[If[Xor[i > j, t] && c == 0, 0, b[n - 1, i, i <= j, Max[0, c - 1]]], {i, 1, n}]];
    a[n_] := b[n, 0, True, 2];
    a /@ Range[0, 27] (* Jean-François Alcover, Feb 26 2020, after Alois P. Heinz *)

Formula

a(n) is odd <=> n in { A000225 }.
a(n) ~ n! * c * 2^n / Pi^n, where c = 0.292816379603485707589209784583144390652038770449692132953726209770208058... - Vaclav Kotesovec, Oct 17 2019

A326308 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i > j < k or i < j > k.

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 26, 85, 476, 2171, 14905, 87153, 708825, 5053464, 47514180, 399542814, 4264132468, 41306091312, 493337571005, 5408829555639, 71476985762027, 874870165668858, 12673922434134249, 171294209823727623, 2699365743596908540, 39925463781029750810
Offset: 0

Views

Author

Alois P. Heinz, Oct 17 2019

Keywords

Examples

			a(6) = 26: 010101, 010102, 010103, 010104, 010105, 010201, 010202, 010203, 010204, 010205, 010212, 010213, 010214, 010215, 010301, 010302, 010303, 010304, 010305, 010312, 010313, 010314, 010315, 010323, 010324, 010325.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j, t, u, c) option remember; `if`(n=0, 1, add(
          `if`(c>0 or i>j and t or ij), max(0, c-1)), 0), i=1..n))
        end:
    a:= n-> b(n, 0, true$2, 2):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, j_, t_, u_, c_] := b[n, j, t, u, c] = If[n == 0, 1, Sum[If[c>0 || i>j && t || ij, Max[0, c-1]], 0], {i, 1, n}]];
    a[n_] := b[n, 0, True, True, 2];
    a /@ Range[0, 25] (* Jean-François Alcover, Feb 29 2020, after Alois P. Heinz *)

Formula

a(n) ~ n! * c * 2^n / (Pi^n * sqrt(n)), where c = 1.0215796642504649172542599982453320786973706265645819484... - Vaclav Kotesovec, Oct 31 2019

A326412 Number of inversion sequences of length n where all consecutive subsequences i,j,k satisfy i >= j <= k or i <= j >= k.

Original entry on oeis.org

1, 1, 2, 5, 17, 69, 330, 1797, 11028, 74932, 559351, 4540088, 39840318, 375421225, 3782383945, 40548234374, 460956742449, 5536790753853, 70077462043662, 931945968071778, 12993337101354500, 189485727877247991, 2884989393948284323, 45772604755492432599
Offset: 0

Views

Author

Alois P. Heinz, Oct 17 2019

Keywords

Examples

			a(4) = 17: 0000, 0001, 0002, 0003, 0010, 0011, 0020, 0021, 0022, 0100, 0101, 0102, 0103, 0110, 0111, 0112, 0113.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, j, t, u, c) option remember; `if`(n=0, 1, add(
          `if`(c>0 or i>=j and t or i<=j and u, b(n-1, i,
            is(i<=j), is(i>=j), max(0, c-1)), 0), i=1..n))
        end:
    a:= n-> b(n, 0, true$2, 2):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, j_, t_, u_, c_] := b[n, j, t, u, c] = If[n == 0, 1, Sum[If[c > 0 || i >= j && t || i <= j && u, b[n - 1, i, i <= j,  i >= j , Max[0, c - 1]], 0], {i, 1, n}]];
    a[n_] := b[n, 0, True, True, 2];
    a /@ Range[0, 25] (* Jean-François Alcover, Mar 01 2020, after Alois P. Heinz *)

Formula

a(n) ~ n! * c * 2^n * n^((Pi+1)/2) / Pi^n, where c = 0.0662002484840446134... - Vaclav Kotesovec, Oct 31 2019
Previous Showing 11-20 of 20 results.