OFFSET
0,5
COMMENTS
The row sums of the absolute values are 1+n*(5+(-1)^n)/4 = 1+A080512(n). - R. J. Mathar, May 12 2013
EXAMPLE
Triangle begins:
1
-1, 1
1, -2, 1
-1, 1, -1, 1
1, -2, 1, -2, 1
-1, 1, -1, 1, -1, 1
1, -2, 1, -2, 1, -2, 1
MAPLE
A122750 := proc(n, k)
if type(n, 'even') then
if type(k, 'even') then
(-1)^k ;
else
2*(-1)^k ;
end if;
else
(-1)^(k+1) ;
end if;
end proc: # R. J. Mathar, May 12 2013
MATHEMATICA
T[n_, k_] := If [Mod[n, 2] == 1, (-1)^(k + 1), (-1)^k*(1 + Mod[k, 2])] a = Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}]; Flatten[a]
For the unsigned version: t[n_, m_] = 1 + Mod[n - m, 2]*Mod[m, 2]; Table[Table[t[n, m], {m, 0, n}], {n, 0, 10}]; Flatten[%] - Roger L. Bagula, Sep 06 2008
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Sep 21 2006, Sep 04 2008
STATUS
approved