OFFSET
1,3
LINKS
G. C. Greubel, Antidiagonals n = 1..50, flattened
FORMULA
Sum_{k=1..n} T(n, k) = A094704(n).
As a triangle T(n,k) read by rows, T(n,1) = 1, T(n,n) = 10^(n-1), and T(n,k) = T(n-1, k) + T(n-2, k-1) otherwise. - Joerg Arndt, Dec 10 2016
From G. C. Greubel, Feb 10 2023: (Start)
A(n, k) = A(n-1, k) + A(n-1, k-1), with A(n, 1) = 1 and A(1, k) = 10^(k-1) (array).
T(n, k) = A(n-k+1, k) (antidiagonal triangle). (End)
EXAMPLE
Matrix array, A(n, k), begins:
1, 10, 100, 1000, ...
1, 11, 110, 1100, ...
1, 12, 121, 1210, ...
1, 13, 133, 1331, ...
1, 14, 146, 1464, ...
1, 15, 160, 1610, ...
Antidiagonal triangle, T(n, k), begins as:
1;
1, 10;
1, 11, 100;
1, 12, 110, 1000;
1, 13, 121, 1100, 10000;
1, 14, 133, 1210, 11000, 100000;
1, 15, 146, 1331, 12100, 110000, 1000000;
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==n, 10^(n-1), If[k==1, 1, T[n-1, k] +T[n-2, k-1]]];
Table[T[n, k], {n, 15}, {k, n}]//Flatten (* G. C. Greubel, Feb 10 2023 *)
PROG
(Magma)
function T(n, k) // T = A164899
if k eq n then return 10^(n-1);
elif k eq 1 then return 1;
else return T(n-1, k) + T(n-2, k-1);
end if; return T;
end function;
[T(n, k): k in [1..n], n in [1..15]]; // G. C. Greubel, Feb 10 2023
(SageMath)
def T(n, k): # T = A164899
if (k==n): return 10^(n-1)
elif (k==1): return 1
else: return T(n-1, k) + T(n-2, k-1)
flatten([[T(n, k) for k in range(1, n+1)] for n in range(1, 16)]) # G. C. Greubel, Feb 10 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Mark Dols, Aug 30 2009
STATUS
approved