login
A080418
Generalized Pascal triangle.
0
1, 1, 3, 1, 2, 4, 1, 5, 5, 5, 1, 4, 11, 9, 6, 1, 7, 14, 21, 14, 7, 1, 6, 22, 34, 36, 20, 8, 1, 9, 27, 57, 69, 57, 27, 9, 1, 8, 37, 83, 127, 125, 85, 35, 10, 1, 11, 44, 121, 209, 253, 209, 121, 44, 11, 1, 10, 56, 164, 331, 461, 463, 329, 166, 54, 12
OFFSET
1,3
FORMULA
T(n, 1)=1, T(n, k)=0 for k>n, T(n, 2) = T(n-1, 1) + T(n-1, 2) + 2*(-1)^n, T(n, k) = T(n-1, k-1) + T(n-1, k) + (-1)^(n+k) for k>2. [corrected by Frank M Jackson, Mar 27 2012]
EXAMPLE
First rows are:
{1},
{1,3},
{1,2,4},
{1,5,5,5},
{1,4,11,9,6},
{1,7,14,21,14,7},
...
For example, 2 = 1 + 3 - 2, 5 = 1 + 2 + 2; 11 = 5 + 5 + 1, 14 = 4 + 11 - 1.
MATHEMATICA
t[n_, k_] := t[n, k]=Which[k==1, 1, n<k, 0, k==2, t[n-1, 1]+t[n-1, 2]+2(-1)^n, k>2, t[n-1, k-1] + t[n-1, k] + (-1)^(n+k)]; Flatten[Table[t[n, k], {n, 1, 20}, {k, 1, n}]] (* Frank M Jackson, Mar 27 2012 *)
CROSSREFS
Columns include A000012, A004442, A000217+(-1)^n, A000292+(-1)^n and in general, binomial(n+k, k)+(-1)^n. Diagonals include A000096, A063258.
Sequence in context: A130419 A083110 A059016 * A073892 A280348 A332397
KEYWORD
easy,nonn,tabl
AUTHOR
Paul Barry, Feb 18 2003
EXTENSIONS
Terms corrected and extended by Frank M Jackson, Mar 27 2012
STATUS
approved