OFFSET
1,5
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
G. Strasser, Generalisation of the Euler adic, Math. Proc. Camb. Phil. Soc. 150 (2010) 241-256, Triangle A_7(n,k).
FORMULA
T(n, k) = (m*n-m*k+1)*T(n-1,k-1) + (m*k-m+1)*T(n-1,k), with T(n, 1) = T(n, n) = 1, and m = 7.
Sum_{k=1..n} T(n, k) = A084947(n-1).
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 16, 1;
1, 143, 143, 1;
1, 1166, 4290, 1166, 1;
1, 9357, 90002, 90002, 9357, 1;
1, 74892, 1621383, 3960088, 1621383, 74892, 1;
1, 599179, 27016857, 134142043, 134142043, 27016857, 599179, 1;
MATHEMATICA
T[n_, k_, m_]:= T[n, k, m]= If[k==1 || k==n, 1, (m*n-m*k+1)*T[n-1, k-1, m] + (m*k -m+1)*T[n-1, k, m]];
A142462[n_, k_]:= T[n, k, 7];
Table[A142462[n, k], {n, 12}, {k, n}]//Flatten (* modified by G. C. Greubel, Mar 17 2022 *)
PROG
(Magma)
function T(n, k, m)
if k eq 1 or k eq n then return 1;
else return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m);
end if; return T;
end function;
A142462:= func< n, k | T(n, k, 7) >;
[A142462(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 17 2022
(Sage)
@CachedFunction
def T(n, k, m):
if (k==1 or k==n): return 1
else: return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m)
def A142462(n, k): return T(n, k, 7)
flatten([[ A142462(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 17 2022
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Sep 19 2008
EXTENSIONS
Edited by N. J. A. Sloane, May 08 2013
STATUS
approved