A099574 Diagonal sums of triangle A099573.
1, 1, 2, 2, 4, 5, 9, 11, 18, 23, 37, 48, 74, 97, 147, 195, 290, 387, 568, 763, 1108, 1495, 2152, 2915, 4167, 5662, 8047, 10962, 15506, 21168, 29825, 40787, 57280, 78448, 109870, 150657, 210521, 288969, 403020, 553677, 770963, 1059932, 1473898
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^4)/((1-x^2-x^4)*(1-x-x^4)) )); // G. C. Greubel, Jul 25 2022 -
Mathematica
a[n_]:= a[n]= Sum[Binomial[n-k-j, j], {k,0,Floor[n/2]}, {j,0,Floor[k/2]}]; Table[a[n], {n, 0, 40}] (* G. C. Greubel, Jul 25 2022 *)
-
SageMath
@CachedFunction def A099574(n): return sum(sum(binomial(n-k-j, j) for j in (0..(k//2))) for k in (0..(n//2))) [A099574(n) for n in (0..40)] # G. C. Greubel, Jul 25 2022
Formula
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..floor(k/2)} binomial(n-k-j, j).
G.f.: (1-x)*(1+x)*(1+x^2) / ( (1-x-x^4)*(1-x^2-x^4) ). - R. J. Mathar, Nov 11 2014
From G. C. Greubel, Jul 25 2022: (Start)
Comments