OFFSET
0,7
LINKS
G. C. Greubel, Antidiagonal rows n = 0..50, flattened
FORMULA
T(n, k) = v(k, n)((1)), where v(n, q) = M*v(n-1, q), M = {{0, 1, 0}, {0, 0, 1}, {q^3, q^3, 0}}, with v(0, q) = {1, 1, 1} (square array).
T(n, k) = f(k, n+1), where f(n, q) = q^3*f(n-2, q) + q^3*f(n-3, q), and f(0,q) = f(1,q) = f(2,q) = 1 (square array). - G. C. Greubel, Jul 06 2021
EXAMPLE
Square array begins as:
1, 1, 1, 2, 2, 3, ...;
1, 1, 1, 16, 16, 136, ...;
1, 1, 1, 54, 54, 1485, ...;
1, 1, 1, 128, 128, 8256, ...;
1, 1, 1, 250, 250, 31375, ...;
1, 1, 1, 432, 432, 93528, ...;
Antidiagonal triangle begins as:
1;
1, 1;
1, 1, 1;
2, 1, 1, 1;
2, 16, 1, 1, 1;
3, 16, 54, 1, 1, 1;
4, 136, 54, 128, 1, 1, 1;
5, 256, 1485, 128, 250, 1, 1, 1;
7, 1216, 2916, 8256, 250, 432, 1, 1, 1;
9, 3136, 41553, 16384, 31375, 432, 686, 1, 1, 1;
MATHEMATICA
(* First program *)
M = {{0, 1, 0}, {0, 0, 1}, {q^3, q^3, 0}};
v[0, q_] = {1, 1, 1};
v[n_, q_]:= v[n, q]= M.v[n-1, q];
T = Table[v[n, q][[1]], {n, 0, 20}, {q, 1, 21}];
Table[T[[n-k+1, k+1]], {n, 0, 10}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Jul 06 2021 *)
(* Second program *)
f[n_, q_]:= f[n, q] = If[n<3, 1, q^3*f[n-2, q] + q^3*f[n-3, q]];
T[n_, k_]:= f[k, n+1];
Table[T[k, n-k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jul 06 2021 *)
PROG
(Magma)
function t(n, k)
if n lt 3 then return 1;
else return k^3*t(n-2, k) + k^3*t(n-3, k);
end if; return t;
end function;
[t(n-k, k+1): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 06 2021
(Sage)
@CachedFunction
def f(n, q): return 1 if (n<3) else q^3*f(n-2, q) + q^3*f(n-3, q)
def T(n, k): return f(k, n+1)
flatten([[T(k, n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jul 06 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 23 2010
EXTENSIONS
Edited by G. C. Greubel, Jul 06 2021
STATUS
approved