login
A143188
Triangle read by rows: T(n, k) = f(k) for 1 <= k <= floor(n/2), T(n, k) = f(n-k) for floor(n/2) < k <= n-1, with T(n, 0) = 1, T(n, n) = 1, and f(k) = (1/2)*(3-(-1)^k)*k*binomial(n, k).
2
1, 1, 1, 1, 4, 1, 1, 6, 6, 1, 1, 8, 12, 8, 1, 1, 10, 20, 20, 10, 1, 1, 12, 30, 120, 30, 12, 1, 1, 14, 42, 210, 210, 42, 14, 1, 1, 16, 56, 336, 280, 336, 56, 16, 1, 1, 18, 72, 504, 504, 504, 504, 72, 18, 1, 1, 20, 90, 720, 840, 2520, 840, 720, 90, 20, 1, 1, 22, 110, 990, 1320, 4620, 4620, 1320, 990, 110, 22, 1
OFFSET
0,5
FORMULA
T(n, k) = f(k) for 1 <= k <= floor(n/2), T(n, k) = f(n-k) for floor(n/2) < k <= n-1, with T(n, 0) = 1, T(n, n) = 1, and f(k) = (1/2)*(3 - (-1)^k) * k * binomial(n, k).
T(n, n-k) = T(n, k).
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 6, 6, 1;
1, 8, 12, 8, 1;
1, 10, 20, 20, 10, 1;
1, 12, 30, 120, 30, 12, 1;
1, 14, 42, 210, 210, 42, 14, 1;
1, 16, 56, 336, 280, 336, 56, 16, 1;
1, 18, 72, 504, 504, 504, 504, 72, 18, 1;
1, 20, 90, 720, 840, 2520, 840, 720, 90, 20, 1;
MATHEMATICA
f[n_, k_]:= (3-(-1)^k)*k*Binomial[n, k]/2;
T[n_, k_]:= If[k*(n-k)==0, 1, If[k<=Floor[n/2], f[n, k], f[n, n-k]]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Magma)
f:= func< n, k | (3-(-1)^k)*k*Binomial(n, k)/2 >;
A143188:= func< n, k | k eq 0 or k eq n select 1 else k le Floor(n/2) select f(n, k) else f(n, n-k) >;
[A143188(n, k): k in [0..n], n in [0..13]]; // G. C. Greubel, Apr 30 2024
(SageMath)
def f(n, k): return (3-(-1)^k)*k*binomial(n, k)/2
def A143188(n, k):
if k==0 or k==n: return 1
elif k<=n//2: return f(n, k)
else: return f(n, n-k)
flatten([[A143188(n, k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Apr 30 2024
CROSSREFS
Cf. A143187.
Sequence in context: A159040 A132046 A141540 * A102413 A144480 A144463
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by G. C. Greubel, Apr 30 2024
STATUS
approved