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 36 results. Next

A289616 A246604 (Catalan(n)-n) with initial terms 1,0,0,2,10 changed to 1,1,1,2,11.

Original entry on oeis.org

1, 1, 1, 2, 11, 37, 126, 422, 1422, 4853, 16786, 58775, 208000, 742887, 2674426, 9694830, 35357654, 129644773, 477638682, 1767263171, 6564120400, 24466266999, 91482563618, 343059613627, 1289904147300, 4861946401427, 18367353072126, 69533550915977, 263747951750332, 1002242216651339
Offset: 1

Views

Author

N. J. A. Sloane, Jul 09 2017

Keywords

Comments

Related to number of mesh patterns of length 2 that avoid the pattern 321.

Crossrefs

A variant of A246604.
All of A000108, A001453, A246604, A273526, A120304, A289615, A289616, A289652, A289653, A289654 are very similar sequences.

Programs

  • Mathematica
    Join[{1,1,1,2,11},Array[CatalanNumber[#]-#&,30,5]] (* Paolo Xausa, Dec 08 2023 *)

A289652 Catalan numbers - 2 (A120304) with first three terms changed to 1,1,1.

Original entry on oeis.org

1, 1, 1, 3, 12, 40, 130, 427, 1428, 4860, 16794, 58784, 208010, 742898, 2674438, 9694843, 35357668, 129644788, 477638698, 1767263188, 6564120418, 24466267018, 91482563638, 343059613648, 1289904147322, 4861946401450, 18367353072150, 69533550916002, 263747951750358
Offset: 1

Views

Author

N. J. A. Sloane, Jul 09 2017

Keywords

Comments

Related to number of mesh patterns of length 2 that avoid the pattern 321.

Crossrefs

A variant of A120304.
All of A000108, A001453, A246604, A273526, A120304, A289615, A289616, A289652, A289653, A289654 are very similar sequences.

Programs

  • Mathematica
    Join[{1,1,1},CatalanNumber[Range[3,30]]-2] (* Paolo Xausa, Dec 08 2023 *)

A289653 Catalan numbers - 2 (A120304) with first four terms changed to 1,1,1,4.

Original entry on oeis.org

1, 1, 1, 4, 12, 40, 130, 427, 1428, 4860, 16794, 58784, 208010, 742898, 2674438, 9694843, 35357668, 129644788, 477638698, 1767263188, 6564120418, 24466267018, 91482563638, 343059613648, 1289904147322, 4861946401450, 18367353072150, 69533550916002, 263747951750358
Offset: 1

Views

Author

N. J. A. Sloane, Jul 09 2017

Keywords

Comments

Related to number of mesh patterns of length 2 that avoid the pattern 321.

Crossrefs

A variant of A120304.All of A000108, A001453, A246604, A273526, A120304, A289615, A289616, A289652, A289653, A289654 are very similar sequences.

Programs

  • Mathematica
    Join[{1,1,1,4},CatalanNumber[Range[4,30]]-2] (* Paolo Xausa, Dec 08 2023 *)

A289654 Related to number of mesh patterns of length 2 that avoid the pattern 321.

Original entry on oeis.org

1, 1, 1, 3, 13, 40, 130, 427, 1428, 4860, 16794
Offset: 1

Views

Author

N. J. A. Sloane, Jul 09 2017

Keywords

Crossrefs

All of A000108, A001453, A246604, A273526, A120304, A289615, A289616, A289652, A289653, A289654 are very similar sequences.

A236855 a(n) is the sum of digits in A239903(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 18 2014

Keywords

Examples

			As the 0th Catalan String is empty, indicated by A239903(0)=0, a(0)=0.
As the 18th Catalan String is [1,0,1,2] (A239903(18)=1012), a(18) = 1+0+1+2 = 4.
Note that although the range of validity of A239903 is inherently limited by the decimal representation employed, it doesn't matter here: We have a(58785) = 55, as the corresponding 58785th Catalan String is [1,2,3,4,5,6,7,8,9,10], even though A239903 cannot represent that unambiguously.
		

Crossrefs

Programs

  • Mathematica
    A236855list[m_] := With[{r = 2*Range[2, m]-1}, Reverse[Map[Total[r-#] &, Select[Subsets[Range[2, 2*m-1], {m-1}], Min[r-#] >= 0 &]]]];
    A236855list[6] (* Generates C(6) terms *) (* Paolo Xausa, Feb 19 2024 *)
  • Scheme
    (define (A236855 n) (apply + (A239903raw n)))
    (define (A239903raw n) (if (zero? n) (list) (let loop ((n n) (row (- (A081288 n) 1)) (col (- (A081288 n) 2)) (srow (- (A081288 n) 2)) (catstring (list 0))) (cond ((or (zero? row) (negative? col)) (reverse! (cdr catstring))) ((> (A009766tr row col) n) (loop n srow (- col 1) (- srow 1) (cons 0 catstring))) (else (loop (- n (A009766tr row col)) (+ row 1) col srow (cons (+ 1 (car catstring)) (cdr catstring))))))))
    ;; Alternative definition:
    (define (A236855 n) (let ((x (A071155 (A081291 n)))) (- (A034968 x) (A060130 x))))

Formula

a(n) = A034968(x) - A060130(x), where x = A071155(A081291(n)).
For up to n = A000108(11)-2 = 58784, a(n) = A007953(A239903(n)).
Catalan numbers, A000108, give the positions of ones, and the n-th triangular number occurs for the first time at the position immediately before that, i.e., a(A001453(n)) = A000217(n-1).
For each n, a(n) >= A000217(A236859(n)).

A236859 The length of the initial ascent 123... in the n-th Catalan numeral, A239903(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 18 2014

Keywords

Examples

			A239903(1) = 1, thus a(1) = 1.
A239903(2) = 10, thus a(2) = 1.
A239903(4) = 12, thus a(4) = 2.
A239903(39) = 1232, thus a(39) = 3.
A239903(58784) = 1234567899, thus a(58784) = 9.
Note that although the range of validity of A239903 is inherently limited by the decimal representation employed, it doesn't matter here: We have a(58785) = 10, as the corresponding 58785th Catalan String is [1,2,3,4,5,6,7,8,9,10], even though A239903 cannot represent that unambiguously.
		

Crossrefs

Programs

Formula

a(0) = 0, and for n>=1, a(n) = A126307(A081291(n))-1.
Each n occurs for the first time (as a record) at the position (C_{n+1})-1, so we have a(A001453(n+1)) = n for all n.

A323224 A(n, k) = [x^k] C^n*x/(1 - x) where C = 2/(1 + sqrt(1 - 4*x)), square array read by ascending antidiagonals with n >= 0 and k >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 8, 9, 1, 0, 1, 5, 13, 22, 23, 1, 0, 1, 6, 19, 41, 64, 65, 1, 0, 1, 7, 26, 67, 131, 196, 197, 1, 0, 1, 8, 34, 101, 232, 428, 625, 626, 1, 0, 1, 9, 43, 144, 376, 804, 1429, 2055, 2056, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2019

Keywords

Comments

Equals A096465 when the leading column (k = 0) is removed. - Georg Fischer, Jul 26 2023

Examples

			The square array starts:
   [n\k]  0  1   2   3    4     5     6      7       8       9
    ---------------------------------------------------------------
    [0]   0, 1,  1,  1,   1,    1,    1,     1,      1,      1, ... A057427
    [1]   0, 1,  2,  4,   9,   23,   65,   197,    626,   2056, ... A014137
    [2]   0, 1,  3,  8,  22,   64,  196,   625,   2055,   6917, ... A014138
    [3]   0, 1,  4, 13,  41,  131,  428,  1429,   4861,  16795, ... A001453
    [4]   0, 1,  5, 19,  67,  232,  804,  2806,   9878,  35072, ... A114277
    [5]   0, 1,  6, 26, 101,  376, 1377,  5017,  18277,  66727, ... A143955
    [6]   0, 1,  7, 34, 144,  573, 2211,  8399,  31655, 118865, ...
    [7]   0, 1,  8, 43, 197,  834, 3382, 13378,  52138, 201364, ...
    [8]   0, 1,  9, 53, 261, 1171, 4979, 20483,  82499, 327656, ...
    [9]   0, 1, 10, 64, 337, 1597, 7105, 30361, 126292, 515659, ...
.
Triangle given by ascending antidiagonals:
    0;
    0, 1;
    0, 1, 1;
    0, 1, 2,  1;
    0, 1, 3,  4,   1;
    0, 1, 4,  8,   9,   1;
    0, 1, 5, 13,  22,  23,   1;
    0, 1, 6, 19,  41,  64,  65,   1;
    0, 1, 7, 26,  67, 131, 196, 197,   1;
    0, 1, 8, 34, 101, 232, 428, 625, 626, 1;
.
The difference table of a column successively gives the preceding columns, here starting with column 6.
col(6) = 1, 65, 196, 428, 804, 1377, 2211, 3382, 4979, 7105, ...
col(5) =    64, 131, 232, 376,  573,  834, 1171, 1597, 2126, ...
col(4) =         67, 101, 144,  197,  261,  337,  426,  529, ...
col(3) =              34,  43,   53,   64,   76,   89,  103, ...
col(2) =                    9,   10,   11,   12,   13,   14, ...
col(1) =                          1,    1,    1,    1,    1, ...
col(0) =                                0,    0,    0,    0, ...
.
Example for the sum formula: C(0) = 1, C(1) = 1, C(2) = 2 and C(3) = 5.
X(3, 4) = {{0,0,0}, {0,0,1}, {0,1,0}, {1,0,0}, {0,0,2}, {0,1,1}, {0,2,0}, {1,0,1},
{1,1,0}, {2,0,0}, {0,0,3}, {0,1,2}, {0,2,1}, {0,3,0}, {1,0,2}, {1,1,1}, {1,2,0},
{2,0,1}, {2,1,0}, {3,0,0}}. T(3,4) = 1+1+1+1+2+1+2+1+1+2+5+2+2+5+2+1+2+2+2+5 = 41.
		

Crossrefs

The coefficients of the polynomials generating the columns are in A323233.
Sums of antidiagonals and row 1 are A014137. Main diagonal is A242798.
Rows: A057427 (n=0), A014137 (n=1), A014138 (n=2), A001453 (n=3), A114277 (n=4), A143955 (n=5).
Columns: A000027 (k=2), A034856 (k=3), A323221 (k=4), A323220 (k=5).
Similar array based on central binomials is A323222.
Cf. A096465.

Programs

  • Maple
    Row := proc(n, len) local C, ogf, ser; C := (1-sqrt(1-4*x))/(2*x);
    ogf := C^n*x/(1-x); ser := series(ogf, x, (n+1)*len+1);
    seq(coeff(ser, x, j), j=0..len) end:
    for n from 0 to 9 do Row(n, 9) od;
    # Alternatively by recurrence:
    B := proc(n, k) option remember; if n <= 0 or k < 0 then 0
    elif n = k then 1 else B(n-1, k) + B(n, k-1) fi end:
    A := (n, k) -> B(n + k, k): seq(lprint(seq(A(n, k), k=0..9)), n=0..9);
  • Mathematica
    (* Illustrating the sum formula, not efficient. *) T[0, K_] := Boole[K != 0];
    T[N_, K_] := Module[{}, r[n_, k_] := FrobeniusSolve[ConstantArray[1, n], k];
    X[n_] := Flatten[Table[r[N, j], {j, 0, n - 1}], 1];
    Sum[Product[CatalanNumber[m[[i]]], {i, 1, N}], {m , X[K]}]];
    Trow[n_] := Table[T[n, k], {k, 0, 9}]; Table[Trow[n], {n, 0, 9}]

Formula

For n>0 and k>0 let X(n, k) denote the set of all tuples of length n with elements from {0, ..., k-1} with sum < k. Let C(m) denote the m-th Catalan number. Then: A(n, k) = Sum_{(j1,...,jn) in X(n, k)} C(j1)*C(j2)*...*C(jn).
A(n, k) = T(n + k, k) with T(n, k) = T(n-1, k) + T(n, k-1) with T(n, k) = 0 if n <= 0 or k < 0 and T(n, n) = 1.

A287640 Number T(n,k) of set partitions of [n], where k is minimal such that for all j in [n]: j is member of block b implies b = 1 or at least one of j-1, ..., j-k is member of a block >= b-1; triangle T(n,k), n >= 0, 0 <= k <= max(floor(n/2), n-2), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 13, 1, 1, 41, 9, 1, 1, 131, 59, 11, 1, 1, 428, 344, 88, 15, 1, 1, 1429, 1906, 634, 146, 23, 1, 1, 4861, 10345, 4389, 1231, 280, 39, 1, 1, 16795, 55901, 30006, 9835, 2763, 602, 71, 1, 1, 58785, 303661, 205420, 77178, 25014, 6967, 1408, 135, 1
Offset: 0

Views

Author

Alois P. Heinz, May 28 2017

Keywords

Examples

			T(4,0) = 1: 1234.
T(4,1) = 13: 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 14|23, 1|234, 1|23|4, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
T(4,2) = 1: 13|2|4.
T(5,2) = 9: 124|3|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 14|2|35, 14|2|3|5, 1|24|3|5.
T(6,3) = 11: 1245|3|6, 1346|2|5, 134|26|5, 134|2|56, 134|2|5|6, 145|23|6, 145|2|36, 145|2|3|6, 14|25|3|6, 15|24|3|6, 1|245|3|6.
T(6,4) = 1: 1345|2|6.
T(7,4) = 15: 12456|3|7, 13457|2|6, 1345|27|6, 1345|2|67, 1345|2|6|7, 1456|23|7, 1456|2|37, 1456|2|3|7, 145|26|3|7, 146|25|3|7, 14|256|3|7, 156|24|3|7, 15|246|3|7, 16|245|3|7, 1|2456|3|7.
Triangle T(n,k) begins:
  1;
  1;
  1,    1;
  1,    4;
  1,   13,     1;
  1,   41,     9,    1;
  1,  131,    59,   11,    1;
  1,  428,   344,   88,   15,   1;
  1, 1429,  1906,  634,  146,  23,  1;
  1, 4861, 10345, 4389, 1231, 280, 39, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000012, A001453.
Row sums give A000110.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0 or l=[], 1, add(b(n-1,
          [seq(max(l[i], j), i=2..nops(l)), j]), j=1..l[1]+1))
        end:
    T:= (n, k)-> `if`(k=0, 1, b(n, [0$k])-b(n, [0$k-1])):
    seq(seq(T(n, k), k=0..max(n/2, n-2)), n=0..12);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0 || l == {}, 1, Sum[b[n-1, Append[Table[ Max[l[[i]], j], {i, 2, Length[l]}], j]], {j, 1, l[[1]] + 1}]];
    T[n_, k_] := If[k == 0, 1, b[n, Table[0, k]] - b[n, Table[0, k - 1]]];
    Table[T[n, k], {n, 0, 12}, { k, 0, Max[n/2, n - 2]}] // Flatten (* Jean-François Alcover, May 22 2018, translated from Maple *)

Formula

T(n,k) = A287641(n,k) - A287641(n,k-1) for k>0, T(n,0) = 1.
T(n+4,n+1) = A168415(n) for n>0.

A085180 Array A(x,y) giving the position of the y-th x in A007001 listed by rising antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 14, 10, 7, 8, 42, 28, 13, 9, 11, 132, 84, 37, 19, 12, 15, 429, 264, 112, 41, 24, 16, 17, 1430, 858, 354, 126, 56, 27, 18, 20, 4862, 2860, 1155, 402, 131, 70, 33, 21, 22, 16796, 9724, 3861, 1320, 422, 174, 79, 36, 23, 25, 58786, 33592, 13156, 4433
Offset: 1

Views

Author

Antti Karttunen, Jun 18 2003

Keywords

Comments

Read by upwards antidiagonals as A(1,1), A(2,1), A(1,2), A(3,1), A(2,2), A(1,3), etc.

Examples

			In A007001 each n occurs for the first time at position Cat(n), thus A(x,1) (the first row) is A000108.
		

Crossrefs

Variant: A085178.
Inverse permutation: A085181.
First row: A000108, second row: A068875 apart from initial terms, first column: A085197, central diagonal: A001453.

A096465 Triangle (read by rows) formed by setting all entries in the first column and in the main diagonal ((i,i) entries) to 1 and the rest of the entries by the recursion T(n, k) = T(n-1, k) + T(n, k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 1, 1, 4, 8, 9, 1, 1, 5, 13, 22, 23, 1, 1, 6, 19, 41, 64, 65, 1, 1, 7, 26, 67, 131, 196, 197, 1, 1, 8, 34, 101, 232, 428, 625, 626, 1, 1, 9, 43, 144, 376, 804, 1429, 2055, 2056, 1, 1, 10, 53, 197, 573, 1377, 2806, 4861, 6917, 6918, 1, 1, 11, 64, 261, 834, 2211, 5017, 9878, 16795, 23713, 23714, 1
Offset: 0

Views

Author

Gerald McGarvey, Aug 12 2004

Keywords

Comments

The third column is A034856 (binomial(n+1, 2) + n-1).
The row sums are A014137 (partial sums of Catalan numbers (A000108)).
The "1st subdiagonal" ((i+1,i) entries) are also A014137.
The "2nd subdiagonal" ((i+2,i) entries) is A014138 ( Partial sums of Catalan numbers (starting 1,2,5,...)).
The "3rd subdiagonal" ((i+3,i) entries) is A001453 (Catalan numbers - 1.)
This is the reverse of A091491 - see A091491 for more information. The sequence of antidiagonal sums gives A124642. - Gerald McGarvey, Dec 09 2006

Examples

			Triangle begins as:
  1;
  1, 1;
  1, 2,  1;
  1, 3,  4,  1;
  1, 4,  8,  9,   1;
  1, 5, 13, 22,  23,   1;
  1, 6, 19, 41,  64,  65,   1;
  1, 7, 26, 67, 131, 196, 197, 1;
		

Crossrefs

Programs

  • Haskell
    a096465 n k = a096465_tabl !! n !! k
    a096465_row n = a096465_tabl !! n
    a096465_tabl = map reverse a091491_tabl
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    A096465:= func< n,k | k eq n select 1 else (n-k)*(&+[Binomial(n+k-2*j, n-j)/(n+k-2*j): j in [0..k]]) >;
    [A096465(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 30 2021
    
  • Maple
    A096465:= (n,k)-> `if`(k=n, 1, (n-k)*add(binomial(n+k-2*j, n-j)/(n+k-2*j), j=0..k));
    seq(seq(A096465(n,k), k=0..n), n=0..12) # G. C. Greubel, Apr 30 2021
  • Mathematica
    T[, 0]= 1; T[n, n_]= 1; T[n_, m_]:= T[n, m]= T[n-1, m] + T[n, m-1]; T[n_, m_] /; n < 0 || m > n = 0; Table[T[n, m], {n, 0, 12}, {m, 0, n}]//Flatten (* Jean-François Alcover, Dec 17 2012 *)
  • Sage
    def A096465(n,k): return 1 if (k==n) else (n-k)*sum( binomial(n+k-2*j, n-j)/(n+k-2*j) for j in (0..k))
    flatten([[A096465(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 30 2021

Formula

From G. C. Greubel, Apr 30 2021: (Start)
T(n, k) = (n-k) * Sum_{j=0..k} binomial(n+k-2*j, n-j)/(n+k-2*j) with T(n,n) = 1.
T(n, k) = A091491(n, n-k).
Sum_{k=0..n} T(n,k) = Sum_{j=0..n} A000108(j) = A014137(n). (End)

Extensions

Offset changed by Reinhard Zumkeller, Jul 12 2012
Previous Showing 11-20 of 36 results. Next