The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A176334 Diagonal sums of number triangle A176331. 3


%S 1,1,2,4,9,21,51,124,305,755,1879,4698,11792,29694,74984,189811,

%T 481498,1223713,3115200,7942134,20275362,51823246,132604193,339644739,

%U 870745187,2234208932,5737129623,14742751524,37909928908,97543380598

%N Diagonal sums of number triangle A176331.

%H G. C. Greubel, <a href="/A176334/b176334.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-k} C(j,n-2k)*C(j,k)*(-1)^(n-k-j).

%p A176334 := proc(n)

%p add(add(binomial(j,n-2*k)*binomial(j,k)*(-1)^(n-k-j),j=0..n-k), k=0..floor(n/2)) ;

%p end proc: # _R. J. Mathar_, Feb 10 2015

%t T[n_, k_]:= T[n, k]= Sum[(-1)^(n-j)*Binomial[j, k]*Binomial[j, n-k], {j,0,n}]; Table[Sum[T[n-k, k], {k,0,Floor[n/2]}], {n,0,30}] (* _G. C. Greubel_, Dec 07 2019 *)

%o (PARI) T(n,k) = sum(j=0, n, (-1)^(n-j)*binomial(j, n-k)*binomial(j, k));

%o vector(30, n, sum(j=0, (n-1)\2, T(n-j-1,j)) ) \\ _G. C. Greubel_, Dec 07 2019

%o (MAGMA) T:= func< n,k | &+[(-1)^(n-j)*Binomial(j,n-k)*Binomial(j,k): j in [0..n]] >;

%o [(&+[T(n-k,k): k in [0..Floor(n/2)]]): n in [0..30]]; // _G. C. Greubel_, Dec 07 2019

%o (Sage)

%o @CachedFunction

%o def T(n, k): return sum( (-1)^(n-j)*binomial(j, n-k)*binomial(j, k) for j in (0..n))

%o [sum(T(n-k, k) for k in (0..floor(n/2))) for n in (0..30)] # _G. C. Greubel_, Dec 07 2019

%o (GAP)

%o T:= function(n,k)

%o return Sum([0..n], j-> (-1)^(n-j)*Binomial(j,k)*Binomial(j,n-k) );

%o end;

%o List([0..30], n-> Sum([0..Int(n/2)], j-> T(n-j,j) )); # _G. C. Greubel_, Dec 07 2019

%Y Cf. A176331, A176332, A176335.

%K easy,nonn

%O 0,3

%A _Paul Barry_, Apr 15 2010

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 19:55 EDT 2021. Contains 345222 sequences. (Running on oeis4.)