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.

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