The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157278 Triangle T(n, k, m) = (m*(n-k) + 1)*T(n-1, k-1, m) + (m*k + 1)*T(n-1, k, m) + m*f(n,k)*T(n-2, k-1, m) with T(n, 0, m) = T(n, n, m) = 1, f(n, k) = 2*k if k <= floor(n/2) otherwise 2*(n-k), and m = 3, read by rows. 8
1, 1, 1, 1, 14, 1, 1, 69, 69, 1, 1, 292, 1134, 292, 1, 1, 1187, 11686, 11686, 1187, 1, 1, 4770, 100737, 254132, 100737, 4770, 1, 1, 19105, 795723, 4061249, 4061249, 795723, 19105, 1, 1, 76448, 5990296, 55157324, 111691642, 55157324, 5990296, 76448, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
T(n, k, m) = (m*(n-k) + 1)*T(n-1, k-1, m) + (m*k + 1)*T(n-1, k, m) + m*f(n,k)*T(n-2, k-1, m) with T(n, 0, m) = T(n, n, m) = 1, f(n, k) = 2*k if k <= floor(n/2) otherwise 2*(n-k), and m = 3.
T(n, n-k, m) = T(n, k, m).
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 14, 1;
1, 69, 69, 1;
1, 292, 1134, 292, 1;
1, 1187, 11686, 11686, 1187, 1;
1, 4770, 100737, 254132, 100737, 4770, 1;
1, 19105, 795723, 4061249, 4061249, 795723, 19105, 1;
1, 76448, 5990296, 55157324, 111691642, 55157324, 5990296, 76448, 1;
MATHEMATICA
f[n_, k_]:= If[k<=Floor[n/2], 2*k, 2*(n-k)];
T[n_, k_, m_]:= T[n, k, m]= If[k==0 || k==n, 1, (m*(n-k)+1)*T[n-1, k-1, m] + (m*k+1)*T[n-1, k, m] + m*f[n, k]*T[n-2, k-1, m]];
Table[T[n, k, 3], {n, 0, 12}, {k, 0, n}]//Flatten (* modified by G. C. Greubel, Feb 06 2022 *)
PROG
(Sage)
def f(n, k): return 2*k if (k <= n//2) else 2*(n-k)
@CachedFunction
def T(n, k, m): # A157278
if (k==0 or k==n): return 1
else: return (m*(n-k) +1)*T(n-1, k-1, m) + (m*k+1)*T(n-1, k, m) + m*f(n, k)*T(n-2, k-1, m)
flatten([[T(n, k, 3) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Feb 06 2022
CROSSREFS
Cf. A007318 (m=0), A157275 (m=1), A157277 (m=2), this sequence (m=3).
Sequence in context: A168622 A168293 A157633 * A144441 A157150 A142461
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Feb 26 2009
EXTENSIONS
Edited by G. C. Greubel, Feb 06 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)