OFFSET
0,8
LINKS
Seiichi Manyama, Antidiagonals n = 0..139, flattened
Wikipedia, Chebyshev polynomials.
FORMULA
sqrt(A(n,k)+1) + sqrt(A(n,k)) = (sqrt(n+1) + sqrt(n))^k.
sqrt(A(n,k)+1) - sqrt(A(n,k)) = (sqrt(n+1) - sqrt(n))^k.
A(n,0) = 0, A(n,1) = n and A(n,k) = (4*n+2) * A(n,k-1) - A(n,k-2) + 2*n for k > 1.
A(n,k) = (T_{k}(2*n+1) - 1)/2 where T_{k}(x) is a Chebyshev polynomial of the first kind.
T_1(x) = x. So A(n,1) = (2*n+1-1)/2 = n.
EXAMPLE
Square array begins:
0, 0, 0, 0, 0, 0, 0, ...
0, 1, 8, 49, 288, 1681, 9800, ...
0, 2, 24, 242, 2400, 23762, 235224, ...
0, 3, 48, 675, 9408, 131043, 1825200, ...
0, 4, 80, 1444, 25920, 465124, 8346320, ...
0, 5, 120, 2645, 58080, 1275125, 27994680, ...
0, 6, 168, 4374, 113568, 2948406, 76545000, ...
MATHEMATICA
Unprotect[Power]; 0^0 := 1; Protect[Power]; Table[(-1 + Sum[Binomial[2 k, 2 j] (# + 1)^(k - j)*#^j, {j, 0, k}])/2 &[n - k], {n, 0, 9}, {k, n, 0, -1}] // Flatten (* Michael De Vlieger, Jan 01 2019 *)
nmax = 9; row[n_] := LinearRecurrence[{4n+3, -4n-3, 1}, {0, n, 4n(n+1)}, nmax+1]; T = Array[row, nmax+1, 0]; A[n_, k_] := T[[n+1, k+1]];
Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jan 06 2019 *)
PROG
(Ruby)
def ncr(n, r)
return 1 if r == 0
(n - r + 1..n).inject(:*) / (1..r).inject(:*)
end
def A(k, n)
(0..n).map{|i| (0..k).inject(-1){|s, j| s + ncr(2 * k, 2 * j) * (i + 1) ** (k - j) * i ** j} / 2}
end
def A322699(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 A322699(10)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Seiichi Manyama, Dec 23 2018
STATUS
approved