login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A106585
Triangle read by rows: even-numbered rows of A106580.
2
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
OFFSET
0,3
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
def T(n, k): # T(n, k) = A106580; T(2*n, k) = A106585
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
Sequence in context: A183760 A125678 A091562 * A057227 A335190 A283170
KEYWORD
nonn,tabf,easy
AUTHOR
N. J. A. Sloane, May 30 2005
EXTENSIONS
More terms from R. J. Mathar, Aug 10 2007
STATUS
approved