login
A180430
Triangle T(n,k) defined by the recurrence in the formula.
2
1, 1, 2, 1, 0, 2, 1, 2, -2, 2, 1, 0, 2, -2, 2, 1, 2, 0, 0, -2, 2, 1, 0, 0, 2, 0, -2, 2, 1, 2, 0, 0, 0, 0, -2, 2, 1, 0, 2, -2, 2, 0, 0, -2, 2, 1, 2, -2, 2, 0, 0, 0, 0, -2, 2, 1, 0, 2, 0, -2, 2, 0, 0, 0, -2, 2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 2, 1, 0, 0, 0, 2, -2, 2, 0, 0, 0, 0, -2, 2, 1, 2, 0, 0, 0, 0, 0, 0
OFFSET
1,3
FORMULA
T(n,1)=1. T(n,2) = 2-T(n-1,2). T(n,k) = Sum_{i=1..k-2} T(n-i,k-1) - Sum{i=1..k-1} T(n-i,k) for k > 2.
EXAMPLE
Table starts:
1;
1, 2;
1, 0, 2;
1, 2, -2, 2;
1, 0, 2, -2, 2;
1, 2, 0, 0, -2, 2;
1, 0, 0, 2, 0, -2, 2;
1, 2, 0, 0, 0, 0, -2, 2;
1, 0, 2, -2, 2, 0, 0, -2, 2;
1, 2, -2, 2, 0, 0, 0, 0, -2, 2;
MAPLE
A180430 := proc(n, k) option remember; if k>n then 0; elif k = 1 then 1; elif k = 2 then 2-procname(n-1, k) ; else add( procname(n-i, k-1), i=1..k-2) - add(procname(n-i, k), i=1..k-1) ; end if; end proc: # R. J. Mathar, Jul 13 2011
PROG
(Excel) Using European dot comma style:
=if(column()=1; 1; if(row()>=column(); sum(indirect(address(row()-column()+2; column()-1; 4)&":"&address(row()-1; column()-1; 4); 4))-sum(indirect(address(row()-column()+1; column(); 4)&":"&address(row()-1; column(); 4); 4)); 0))
CROSSREFS
Cf. A176702.
Sequence in context: A333948 A287360 A035443 * A246369 A036261 A140575
KEYWORD
sign,tabl
AUTHOR
Mats Granvik, Sep 04 2010
STATUS
approved