OFFSET
0,6
LINKS
Seiichi Manyama, Antidiagonals n = 0..139, flattened
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, ...
-1, 1, 0, 0, 0, ...
2, -1, 1, 0, 0, ...
-5, -2, -3, 1, 0, ...
15, 9, 9, -4, 1, ...
PROG
(Ruby)
def ncr(n, r)
return 1 if r == 0
(n - r + 1..n).inject(:*) / (1..r).inject(:*)
end
def A(k, n)
ary = [1]
(1..n).each{|i| ary << (-1) ** (k % 2 + 1) * (0..i - 1).inject(0){|s, j| s + (-1) ** (j % 2) * ncr(i - 1, j) * ncr(j + 1, k) * ary[i - 1 - j]}}
ary
end
def A292948(n)
a = []
(0..n).each{|i| a << A(i, n - i)}
ary = []
(0..n).each{|i|
(0..i).each{|j|
ary << a[i - j][j]
}
}
ary
end
p A292948(20)
CROSSREFS
AUTHOR
Seiichi Manyama, Sep 27 2017
STATUS
approved