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-2 of 2 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

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
Showing 1-2 of 2 results.