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

A259841 Number T(n,k) of elements k in all n X n Tesler matrices of nonnegative integers; triangle T(n,k), n>=1, 1<=k<=n, read by rows.

Original entry on oeis.org

1, 3, 1, 15, 5, 2, 117, 37, 17, 7, 1367, 418, 189, 100, 40, 23329, 7027, 3058, 1688, 939, 357, 570933, 171428, 72194, 39274, 24050, 13429, 4820, 19740068, 5948380, 2449366, 1293768, 807576, 517548, 283510, 96030
Offset: 1

Views

Author

Alois P. Heinz, Jul 06 2015

Keywords

Comments

For the definition of Tesler matrices see A008608.
Sum_{k=1..n} k * T(n,k) = A259787(n).

Examples

			There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], containing three 1's and one 2, thus row 2 gives [3, 1].
Triangle T(n,k) begins:
       1;
       3,      1;
      15,      5,     2;
     117,     37,    17,     7;
    1367,    418,   189,   100,    40;
   23329,   7027,  3058,  1688,   939,   357;
  570933, 171428, 72194, 39274, 24050, 13429, 4820;
  ...
		

Crossrefs

Main diagonal gives A008608(n-1) for n>1.
Column k=1 gives A259843.
Row sums give A259842.
Cf. A259787.

Programs

  • Maple
    g:= u-> `if`(u=0, 0, x^u):
    b:= proc(n, i, l) option remember; (m->`if`(m=0, [1, g(n)], `if`(i=0,
         (p->p+[0, p[1]*g(n)])(b(l[1]+1, m-1, subsop(1=NULL, l))), add(
         (p->p+[0, p[1]*g(j)])(b(n-j, i-1, subsop(i=l[i]+j, l)))
          , j=0..n))))(nops(l))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(1,n-1,[0$(n-1)])[2]):
    seq(T(n), n=1..10);
  • Mathematica
    g[u_] := If[u == 0, 0, x^u];
    b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, g[n]}, If[i == 0, # + {0, #[[1]] g[n]} & [b[l[[1]]+1, m-1, ReplacePart[l, 1 -> Nothing]]], Sum[# + {0, #[[1]] g[j]} & [b[n-j, i-1, ReplacePart[l, i -> l[[i]] + j]]], {j, 0, n}]]]][Length[l]];
    T[n_] := Table[Coefficient[#, x, i], {i, 1, n}] & [b[1, n-1, Table[0, {n-1}]][[2]]];
    Array[T, 10] // Flatten (* Jean-François Alcover, Oct 28 2020, after Maple *)

A259844 Number A(n,k) of n X n upper triangular matrices (m_{i,j}) of nonnegative integers with k = Sum_{j=h..n} m_{h,j} - Sum_{i=1..h-1} m_{i,h} for all h in {1,...,n}; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 7, 1, 1, 1, 4, 22, 40, 1, 1, 1, 5, 50, 351, 357, 1, 1, 1, 6, 95, 1686, 11275, 4820, 1, 1, 1, 7, 161, 5796, 138740, 689146, 96030, 1, 1, 1, 8, 252, 16072, 1010385, 25876312, 76718466, 2766572, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 06 2015

Keywords

Comments

A(n,k) counts generalized Tesler matrices. For the definition of Tesler matrices see A008608.

Examples

			A(2,2) = 3: [1,1; 0,3], [2,0; 0,2], [0,2; 0,4].
Square array A(n,k) begins:
  1,   1,     1,      1,       1,       1, ...
  1,   1,     1,      1,       1,       1, ...
  1,   2,     3,      4,       5,       6, ...
  1,   7,    22,     50,      95,     161, ...
  1,  40,   351,   1686,    5796,   16072, ...
  1, 357, 11275, 138740, 1010385, 5244723, ...
		

Crossrefs

Columns k=0-2 give: A000012, A008608, A259919.
Rows n=0+1,2-3 give: A000012, A000027(k+1), A002412(k+1).

Programs

  • Maple
    b:= proc(n, i, l, k) option remember; (m-> `if`(m=0, 1,
          `if`(i=0, b(l[1]+k, m-1, subsop(1=NULL, l), k), add(
          b(n-j, i-1, subsop(i=l[i]+j, l), k), j=0..n))))(nops(l))
        end:
    A:= (n, k)-> b(k, n-1, [0$(n-1)], k):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[n_, i_, l_List, k_] := b[n, i, l, k] = Function[{m}, If[m == 0, 1, If[i == 0, b[l[[1]] + k, m-1, ReplacePart[l, 1 -> Sequence[]], k], Sum[b[n-j, i-1, ReplacePart[l, i -> l[[i]]+j], k], {j, 0, n}]]]][Length[l]]; A[n_, k_] := b[k, n-1, Array[0&, n-1], k]; A[0, ] = A[, 0] = 1; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)

A259786 Number T(n,k) of n X n Tesler matrices of nonnegative integers with element sum n+k; triangle T(n,k), n>=1, 0<=k<=n*(n-1)/2, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 1, 6, 11, 11, 7, 3, 1, 1, 10, 35, 65, 81, 71, 50, 27, 12, 4, 1, 1, 15, 85, 260, 526, 771, 878, 811, 627, 416, 238, 118, 50, 18, 5, 1, 1, 21, 175, 805, 2436, 5362, 9123, 12568, 14465, 14289, 12345, 9483, 6534, 4071, 2297, 1176, 542, 224, 81, 25, 6, 1
Offset: 1

Views

Author

Alois P. Heinz, Jul 05 2015

Keywords

Comments

For the definition of Tesler matrices see A008608.

Examples

			Triangle T(n,k) begins:
  1;
  1,  1;
  1,  3,  2,   1;
  1,  6, 11,  11,   7,   3,   1;
  1, 10, 35,  65,  81,  71,  50,  27,  12,   4,   1;
  1, 15, 85, 260, 526, 771, 878, 811, 627, 416, 238, 118, 50, 18, 5, 1;
  ...
		

Crossrefs

Row sums give A008608.

Programs

  • Maple
    b:= proc(n, i, l) option remember; (m-> `if`(m=0, 1, expand(
          `if`(i=0, x^(l[1]+1)*b(l[1]+1, m-1, subsop(1=NULL, l)), add(
           b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n)))))(nops(l))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=n-1..degree(p)))(b(1, n-1, [0$(n-1)])):
    seq(T(n), n=1..8);
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, 1, Expand[
         If[i == 0, x^(l[[1]] + 1)*b[l[[1]] + 1, m - 1,
         ReplacePart[l, 1 -> Nothing]], Sum[b[n - j, i - 1,
         ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]]][Length[l]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, n - 1,
         Exponent[p, x]}]][b[1, n - 1, Table[0, {n - 1}]]];
    Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Mar 18 2022, after Alois P. Heinz *)

Formula

Sum_{k=0..n*(n-1)/2} (n+k) * T(n,k) = A259787(n).

A259787 Total element sum of all n X n Tesler matrices of nonnegative integers.

Original entry on oeis.org

1, 5, 31, 270, 3370, 60146, 1522031, 54055976, 2666453502, 180847717069, 16704822358932, 2082808024263350, 347639192485104658, 77076883307827211845, 22537752778732740525833, 8633258320969387044105210, 4305220991520242104331411368, 2778601200692503839128415662124
Offset: 1

Views

Author

Alois P. Heinz, Jul 05 2015

Keywords

Comments

For the definition of Tesler matrices see A008608.

Examples

			There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], the total sum of all elements gives a(2) = 5.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, l) option remember; (m-> `if`(m=0, [1, 0], `if`(i=0,
          (p-> p+[0, p[1]*(l[1]+1)])(b(l[1]+1, m-1, subsop(1=NULL, l))),
           add(b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l))
        end:
    a:= n-> (p-> p[1]+p[2])(b(1, n-1, [0$(n-1)])):
    seq(a(n), n=1..14);
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, 0}, If[i == 0, Function[p, p + {0, p[[1]]*(l[[1]] + 1)}][b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Nothing]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]][Length[l]];
    a[n_] := Function[p, p[[1]] + p[[2]]][b[1, n - 1, Table[0, {n - 1}]]];
    Table[a[n], {n, 1, 14}] (* Jean-François Alcover, Jun 27 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=0..n*(n-1)/2} (n+k) * A259786(n,k).
a(n) = Sum_{k=0..n} k * A259841(n,k).

A259485 Number of n X n connected Tesler matrices.

Original entry on oeis.org

1, 1, 4, 27, 275, 4066, 85888, 2567269, 107630237, 6269269823, 502429080919, 54869692738326, 8091237358339821, 1597342350434681954, 418809228874760212806, 144760685900877097431589, 65510311668753649557469187, 38566383210089506976493649269, 29359678772700284486457832056879
Offset: 1

Views

Author

Alejandro H. Morales, Jun 28 2015

Keywords

Comments

Number of n X n upper triangular matrices A of nonnegative integers such that a_1i + a_2i + ... + a_{i-1,i} - a_ii - a_{i,i+1} - ... - a_in = -1, with lowest lattice path above the positive entries not touching the diagonal.

Examples

			For n = 3 the a(3) = 4 matrices are [[0,1,0],[0,1,1],[0,0,2]], [[0,1,0],[0,0,2],[0,0,3]], [[0,0,1],[0,1,0],[0,0,2]], [[0,0,1],[0,0,1],[0,0,3]].
		

Crossrefs

Programs

  • Maple
    multcoeff:=proc(n, f, coeffv, k)
       local i, currcoeff;
       currcoeff:=f;
       for i from 1 to n do
          currcoeff:=`if`(coeffv[i]=0, coeff(series(currcoeff, x[i], k), x[i], 0), coeff(series(currcoeff, x[i], k), x[i]^coeffv[i]));
       end do;
       return currcoeff;
    end proc:
    F:=n->mul(mul((1-x[i]*x[j]^(-1))^(-1), j=i+1..n), i=1..n):
    b := n -> multcoeff(n+1, F(n+1), [seq(1, i=1..n), -n], n+2):
    a := n -> `if`(n=1,1,b(n)-add(b(n-i)*a(i),i=1..n-1)):
    seq(a(i), i=2..6)
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = With[{m = Length[l]}, If[m == 0, 1, If[i == 0, b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Sequence[]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]];
    c[n_] := b[1, n - 1, Array[0&, n - 1]];
    a[n_] := a[n] = c[n] - Sum[c[n - i] a[i], {i, 1, n - 1}];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 19}] (* Jean-François Alcover, Nov 13 2020, after Alois P. Heinz in A008608 *)

Formula

a(n) = A008608(n) - Sum_{i=1..n-1} A008608(n-i)*a(i).

Extensions

a(15)-a(19) from Alois P. Heinz, Jul 05 2015

A259666 Number of n X n prime Tesler matrices.

Original entry on oeis.org

1, 1, 3, 18, 181, 2788, 62590, 1989540, 87979661, 5349559222, 443306080232, 49679250634068, 7473835936432840, 1498682325685621140, 397803907069442925517, 138847938093177059278212, 63325340852730727078521540, 37513306417359729218973719474, 28701720575221087513434901774347
Offset: 1

Views

Author

Alejandro H. Morales, Jul 02 2015

Keywords

Comments

Number of n X n upper triangular matrices A of nonnegative integers such that a_{1,i} + a_{2,i} + ... + a_{i-1,i} - a_{i,i} - a_{i,i+1} - ... - a_{i,n} = -1, whose simple graph G with vertices 1,2,3..,n and edges (i,j) if a_{i,j} > 0 is connected.

Examples

			Example: For n =3 the a(3) = 3 matrices are [[0,1,0],[0,1,1],[0,0,2]], [[0,1,0],[0,0,2],[0,0,3]], [[0,0,1],[0,0,1],[0,0,3]].
E.g.f.: 1 + x+(1/2)*x^2+(3/6)*x^3+(18/24)*x^4+(181/120)*x^5+(2788/720)*x^6 + ...
		

Crossrefs

Programs

  • Maple
    multcoeff:=proc(n, f, coeffv, k)
       local i, currcoeff;
       currcoeff:=f;
       for i from 1 to n do
          currcoeff:=`if`(coeffv[i]=0, coeff(series(currcoeff, x[i], k), x[i], 0), coeff(series(currcoeff, x[i], k), x[i]^coeffv[i]));
       end do;
       return currcoeff;
    end proc:
    F:=n->mul(mul((1-x[i]*x[j]^(-1))^(-1), j=i+1..n), i=1..n):
    b := n -> multcoeff(n+1, F(n+1), [seq(1, i=1..n), -n], n+2):
    sa := 1 + log(1+ add(b(n)*x^n/n!,n=1..7)):
    a := n -> n!*coeff(series(sa,x,n+1),x,n):
    seq(a(i),i=1..6);
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = Function[{m}, If[m == 0, 1, If[i == 0, b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Sequence[]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]][Length[l]];
    c[n_] := b[1, n-1, Array[0&, n-1]];
    a[n_] := a[n] = SeriesCoefficient[1 + Log[1 + Sum[c[k] x^k/k!, {k, 1, n}]], {x, 0, n}] n!;
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 19}] (* Jean-François Alcover, Nov 14 2020, after Alois P. Heinz in A008608 *)

Formula

E.g.f.: 1 + log( 1+ sum(n>=1, A008608(n) * x^n / n! ) ).

Extensions

a(15)-a(19) from Alois P. Heinz, Jul 05 2015

A248330 The product of the first n Catalan numbers and the number of standard Young tableaux of shape(1,2,...,n).

Original entry on oeis.org

1, 1, 4, 160, 107520, 1722040320, 854352419880960, 16185399027773630054400, 13931397052191274338996977664000, 632089112919018408339999461491467091968000, 1721041721929360607907210006858724622834371563356160000
Offset: 0

Views

Author

Alejandro H. Morales, Oct 04 2014

Keywords

Comments

The volume of a certain polytope (the Tesler polytope) whose lattice points are Tesler matrices (A008608), and with (n+1)! integral vertices (permutation Tesler matrices).
This is also the iterated constant term of the rational function (x1+x2+...+xn+x(n+1))^binomial(n+1,2)*product_{1<=i

Crossrefs

Programs

  • Maple
    A248330 := proc(n) local i; mul(binomial(2*k, k)/(1+k), k=0..n)*binomial(n+1, 2)!/ mul( (2*i+1)^(n-i), i=0..n-1 ); end;

Formula

a(n) = A005118(n+1) * A003046(n).
a(n) = A005118(n+1) * Product_{k=0..n} A000108(k).

A257661 Number of n X n upper triangular matrices (m_{i,j}) of nonnegative integers with (Sum_{j=h..n} m_{h,j} - Sum_{i=1..h-1} m_{i,h}) in {-1,+1} for all h in {1,...,n}.

Original entry on oeis.org

1, 1, 3, 13, 91, 957, 14883, 335685, 10809115, 489983429, 30878036187, 2674610665285, 315157973368499, 50044685318592821, 10616892819871806779, 2985356872553448786917, 1104511676749585428665683, 534037023412133157982099237, 335321015907953576212969151451
Offset: 0

Author

Alois P. Heinz, Jul 12 2015

Keywords

Examples

			a(2) = 3: [1,0; 0,1], [0,1; 0,0], [0,1; 0,2].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, l) option remember; (m-> `if`(m=0, 1,
          `if`(i=0, b(l[1]+1, m-1, subsop(1=NULL, l))+
          `if`(l[1]=0, 0, b(l[1]-1, m-1, subsop(1=NULL, l))),
          add(b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l))
        end:
    a:= n-> b(1, n-1, [0$(n-1)]):
    seq(a(n), n=0..14);
  • Mathematica
    b[n_, i_, l_] := b[n, i, l] = With[{m = Length[l]}, If[m == 0, 1, If[i == 0, b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Nothing]] + If[l[[1]] == 0, 0, b[l[[1]] - 1, m - 1, ReplacePart[l, 1 -> Nothing]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]];
    a[n_] :=  b[1, n - 1, Table[0, {n - 1}]];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 18 2023, after Alois P. Heinz *)

A259842 Number of nonzero elements in all n X n Tesler matrices of nonnegative integers.

Original entry on oeis.org

1, 4, 22, 178, 2114, 36398, 896128, 31136246, 1508259823, 100727634758, 9179951931947, 1131033520118692, 186769092227016256, 41008206412935719870, 11884278052476825052541, 4514826724675651497522250, 2234142899928806917974566378, 1431533853656098851281985968328
Offset: 1

Author

Alois P. Heinz, Jul 06 2015

Keywords

Comments

For the definition of Tesler matrices see A008608.

Examples

			There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], containing four nonzero elements, thus a(2) = 4.
		

Crossrefs

Row sums of A259841.
Cf. A008608.

Programs

  • Maple
    g:= u-> `if`(u=0, 0, 1):
    b:= proc(n, i, l) option remember; (m->`if`(m=0, [1, g(n)], `if`(i=0,
         (p->p+[0, p[1]*g(n)])(b(l[1]+1, m-1, subsop(1=NULL, l))), add(
         (p->p+[0, p[1]*g(j)])(b(n-j, i-1, subsop(i=l[i]+j, l)))
          , j=0..n))))(nops(l))
        end:
    a:= n-> b(1, n-1, [0$(n-1)])[2]:
    seq(a(n), n=1..14);
  • Mathematica
    g[u_] := If[u == 0, 0, 1];
    b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, g[n]}, If[i == 0,
         # + {0, #[[1]] g[n]}&[b[l[[1]] + 1, m - 1, ReplacePart[l, 1 ->
         Nothing]]], Sum[# + {0, #[[1]] g[j]}&[b[n - j, i - 1, ReplacePart[
         l, i -> l[[i]] + j]]], {j, 0, n}]]]][Length[l]];
    a[n_] := b[1, n - 1, Table[0, {n - 1}]][[2]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 18}] (* Jean-François Alcover, May 15 2022, after Alois P. Heinz *)

Formula

a(n) = Sum_{k=1..n} A259841(n,k).

A259843 Number of 1 elements in all n X n Tesler matrices of nonnegative integers.

Original entry on oeis.org

1, 3, 15, 117, 1367, 23329, 570933, 19740068, 951916938, 63295826369, 5743788894259, 704672958229270, 115877288304781885, 25338423080304873558, 7313716095786704678585, 2767636572798780219442327, 1364367542961142350256304582, 871016593387715393187604249892
Offset: 1

Author

Alois P. Heinz, Jul 06 2015

Keywords

Comments

For the definition of Tesler matrices see A008608.

Examples

			There are two 2 X 2 Tesler matrices: [1,0; 0,1], [0,1; 0,2], containing three 1's, thus a(2) = 3.
		

Crossrefs

Column k=1 of A259841.

Programs

  • Maple
    g:= u-> `if`(u=1, 1, 0):
    b:= proc(n, i, l) option remember; (m->`if`(m=0, [1, g(n)], `if`(i=0,
         (p->p+[0, p[1]*g(n)])(b(l[1]+1, m-1, subsop(1=NULL, l))), add(
         (p->p+[0, p[1]*g(j)])(b(n-j, i-1, subsop(i=l[i]+j, l)))
          , j=0..n))))(nops(l))
        end:
    a:= n-> b(1, n-1, [0$(n-1)])[2]:
    seq(a(n), n=1..14);
  • Mathematica
    g[u_] := If[u == 1, 1, 0];
    b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, g[n]}, If[i == 0, # + {0, #[[1]] g[n]}&[b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Nothing]] ], Sum[# + {0, #[[1]] g[j]}&[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]]], {j, 0, n}]]]][Length[l]];
    a[n_] := b[1, n - 1, Table[0, {n - 1}]][[2]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 18}] (* Jean-François Alcover, May 15 2022, after Alois P. Heinz *)

Formula

a(n) = A259841(n,1).
Showing 1-10 of 11 results. Next