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

A008608 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.

Original entry on oeis.org

1, 2, 7, 40, 357, 4820, 96030, 2766572, 113300265, 6499477726, 515564231770, 55908184737696, 8203615387086224, 1613808957720017838, 422045413500096791377, 145606442599303799948900, 65801956684134601408784992, 38698135339344702725297294600, 29437141738828506134939056167071, 28800381656420765181010517468370560
Offset: 1

Views

Author

Glenn P. Tesler (gptesler(AT)euclid.ucsd.edu)

Keywords

Comments

Garsia and Haglund call these Tesler matrices. - N. J. A. Sloane, Jul 04 2014
This is also the value of the type A_n Kostant partition function evaluated at (1,1,...,1,-n) in ZZ^(n+1). This is the number of ways of writing the vector (1,1,...,1,-n) in ZZ^(n+1) as a linear combination with nonnegative integer coefficients of the vectors e_i - e_j, for 1 <= iAlejandro H. Morales, Mar 11 2014

Examples

			For n = 3 there are seven matrices: [[1,0,0],[0,1,0],[0,0,1]], [[1,0,0],[0,0,1],[0,0,2]], [[0,0,1],[0,1,0],[0,0,2]], [[0,0,1],[0,0,1],[0,0,3]], [[0,1,0],[0,2,0],[0,0,1]], [[0,1,0],[0,1,1],[0,0,2]], [[0,1,0],[0,0,2],[0,0,3]], so a(3) = 7. - _Alejandro H. Morales_, Jul 03 2015
		

Crossrefs

Row sums of A259786.
Main diagonal (shifted) of A259841.
Column k=1 of A259844.

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):
    a := n -> multcoeff(n+1,F(n+1),[seq(1,i=1..n),-n],n+2):
    seq(a(i),i=2..7) # Alejandro H. Morales, Mar 11 2014, Jun 28 2015
    # second Maple program:
    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)), 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=1..14);  # Alois P. Heinz, Jul 05 2015
  • Mathematica
    b[n_, i_, l_List] := 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]]; a[n_] := b[1, n-1, Array[0&, n-1]]; Table[a[n], {n, 1, 14}] (* Jean-François Alcover, Jul 16 2015, after Alois P. Heinz *)

Extensions

a(7)-a(13) from Alejandro H. Morales, Mar 12 2014
a(14) from Alejandro H. Morales, Jun 04 2015
a(15)-a(22) from Alois P. Heinz, Jul 05 2015

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).

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

Views

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

Views

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