login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A259842 Number of nonzero elements in all n X n Tesler matrices of nonnegative integers. 1

%I #15 May 15 2022 07:40:36

%S 1,4,22,178,2114,36398,896128,31136246,1508259823,100727634758,

%T 9179951931947,1131033520118692,186769092227016256,

%U 41008206412935719870,11884278052476825052541,4514826724675651497522250,2234142899928806917974566378,1431533853656098851281985968328

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

%C For the definition of Tesler matrices see A008608.

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

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

%p g:= u-> `if`(u=0, 0, 1):

%p b:= proc(n, i, l) option remember; (m->`if`(m=0, [1, g(n)], `if`(i=0,

%p (p->p+[0, p[1]*g(n)])(b(l[1]+1, m-1, subsop(1=NULL, l))), add(

%p (p->p+[0, p[1]*g(j)])(b(n-j, i-1, subsop(i=l[i]+j, l)))

%p , j=0..n))))(nops(l))

%p end:

%p a:= n-> b(1, n-1, [0$(n-1)])[2]:

%p seq(a(n), n=1..14);

%t g[u_] := If[u == 0, 0, 1];

%t b[n_, i_, l_] := b[n, i, l] = Function[m, If[m == 0, {1, g[n]}, If[i == 0,

%t # + {0, #[[1]] g[n]}&[b[l[[1]] + 1, m - 1, ReplacePart[l, 1 ->

%t Nothing]]], Sum[# + {0, #[[1]] g[j]}&[b[n - j, i - 1, ReplacePart[

%t l, i -> l[[i]] + j]]], {j, 0, n}]]]][Length[l]];

%t a[n_] := b[1, n - 1, Table[0, {n - 1}]][[2]];

%t Table[Print[n, " ", a[n]]; a[n], {n, 1, 18}] (* _Jean-François Alcover_, May 15 2022, after _Alois P. Heinz_ *)

%Y Row sums of A259841.

%Y Cf. A008608.

%K nonn

%O 1,2

%A _Alois P. Heinz_, Jul 06 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 11:35 EDT 2024. Contains 371912 sequences. (Running on oeis4.)