OFFSET
0,2
LINKS
Oboifeng Dira, Table of n, a(n) for n = 0..54
FORMULA
T(n,0) = 2*n+1 for k=0;
T(n,k) = ((2+sqrt(2))^(k+1)-(2-sqrt(2))^(k+1))*(2*n-k+1)/(4*sqrt(2)) for 1<=k<=n.
EXAMPLE
Triangle begins:
1;
3, 4;
5, 8, 21;
7, 12, 35, 96;
9, 16, 49, 144, 410;
...
T(3,2) = ((2+sqrt(2))^3-(2-sqrt(2))^3)*(6-2+1)/(4*sqrt(2)) = (28*sqrt(2))*(5)/(4*sqrt(2) = 35.
MAPLE
T := proc (n, k) if k = 0 and 0 <= n then 2*n+1 elif 1 <= k and k <= n then round((((2+sqrt(2))^(k+1)-(2-sqrt(2))^(k+1))*(2*n-k+1)/(4*sqrt(2)))) else 0 end if end proc:seq(print(seq(T(n, k), k=0..n)), n=0..9);
PROG
(PARI) T(n, k) = if (k==0, 2*n+1, if (k<=n, sum(i=n-k, n, sum(j=0, i-n+k, if ((i==n) && (j==k), 0, T(i, j)), 0))));
matrix(10, 10, n, k, T(n-1, k-1)) \\ Michel Marcus, Sep 08 2020
(PARI) T(n, k) = if (k==0, 2*n+1, if (k>n, 0, my(w=quadgen(8, 'w)); ((2+w)^(k+1)-(2-w)^(k+1))*(2*n-k+1)/(4*w)));
matrix(10, 10, n, k, T(n-1, k-1)) \\ Michel Marcus, Sep 10 2020
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Oboifeng Dira, Jul 14 2020
STATUS
approved