login
Square array T(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of e.g.f. exp(2 * (exp(x) - Sum_{j=0..k} x^j/j!)).
1

%I #33 Nov 21 2020 09:10:25

%S 1,1,2,1,0,6,1,0,2,22,1,0,0,2,94,1,0,0,2,14,454,1,0,0,0,2,42,2430,1,0,

%T 0,0,2,2,222,14214,1,0,0,0,0,2,42,1066,89918,1,0,0,0,0,2,2,142,6078,

%U 610182,1,0,0,0,0,0,2,2,366,36490,4412798,1,0,0,0,0,0,2,2,142,3082,238046,33827974

%N Square array T(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of e.g.f. exp(2 * (exp(x) - Sum_{j=0..k} x^j/j!)).

%H Seiichi Manyama, <a href="/A336345/b336345.txt">Antidiagonals n = 0..139, flattened</a>

%F E.g.f. of column k: (Product_{j>k} exp(x^j/j!))^2.

%F T(0,k) = 1, T(1,k) = T(2,k) = ... = T(k,k) = 0 and T(n,k) = 2 * Sum_{j=k..n-1} binomial(n-1,j)*T(n-1-j,k) for n > k.

%e Square array begins:

%e 1, 1, 1, 1, 1, 1, 1, ...

%e 2, 0, 0, 0, 0, 0, 0, ...

%e 6, 2, 0, 0, 0, 0, 0, ...

%e 22, 2, 2, 0, 0, 0, 0, ...

%e 94, 14, 2, 2, 0, 0, 0, ...

%e 454, 42, 2, 2, 2, 0, 0, ...

%e 2430, 222, 42, 2, 2, 2, 0, ...

%o (PARI) {T(n, k) = n!*polcoef(prod(j=k+1, n, exp((x^j+x*O(x^n))/j!))^2, n)}

%o (Ruby)

%o def ncr(n, r)

%o return 1 if r == 0

%o (n - r + 1..n).inject(:*) / (1..r).inject(:*)

%o end

%o def A(k, n)

%o ary = [1]

%o (1..n).each{|i| ary << 2 * (k..i - 1).inject(0){|s, j| s + ncr(i - 1, j) * ary[-1 - j]}}

%o ary

%o end

%o def A336345(n)

%o a = []

%o (0..n).each{|i| a << A(i, n - i)}

%o ary = []

%o (0..n).each{|i|

%o (0..i).each{|j|

%o ary << a[i - j][j]

%o }

%o }

%o ary

%o end

%o p A336345(20)

%Y Columns k=0..4 give A001861, A194689, A339014, A339017, A339027.

%Y Main diagonal gives A000007.

%Y Cf. A293024.

%K nonn,tabl

%O 0,3

%A _Seiichi Manyama_, Nov 20 2020