OFFSET
0,3
LINKS
G. C. Greubel, Rows n = 0..50 of the irregular triangle, flattened
FORMULA
T(n, k) = A106580(2*n, k).
EXAMPLE
Irregular triangle begins as:
1;
1, 2, 2;
1, 2, 5, 7, 7;
1, 2, 5, 13, 22, 29, 29;
1, 2, 5, 13, 34, 65, 101, 130, 130;
1, 2, 5, 13, 34, 89, 185, 322, 481, 611, 611;
1, 2, 5, 13, 34, 89, 233, 514, 973, 1613, 2354, 2965, 2965;
1, 2, 5, 13, 34, 89, 233, 610, 1405, 2837, 5090, 8185, 11761, 14726, 14726;
MAPLE
A106580:= proc(n, k) option remember; if k =0 then 1; else A106580(n, k-1) + add(A106580(n-2*i, k-i), i=1..min(k, floor(n/2), n-k)); fi; end: for n from 0 to 18 by 2 do for k from 0 to n do printf("%d, ", A106580(n, k)); od; od; # R. J. Mathar, Aug 10 2007
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0, 1, T[n, k-1] + Sum[T[n-2*j, k-j], {j, 1, Min[k, Floor[n/2], n-k]}]]; (* T(n, k) = A106580; T(2*n, k) = A106585 *)
Table[T[2*n, k], {n, 0, 12}, {k, 0, 2*n}]//Flatten (* G. C. Greubel, Sep 07 2021 *)
PROG
(Sage)
@CachedFunction
if (k<0): return 0
elif (k==0): return 1
else: return T(n, k-1) + sum( T(n-2*j, k-j) for j in (1..min(k, n//2, n-k)))
flatten([[T(2*n, k) for k in (0..2*n)] for n in (0..10)]) # G. C. Greubel, Sep 07 2021
CROSSREFS
KEYWORD
nonn,tabf,easy
AUTHOR
N. J. A. Sloane, May 30 2005
EXTENSIONS
More terms from R. J. Mathar, Aug 10 2007
STATUS
approved