login
A323211
Level 1 of Pascal's pyramid. T(n, k) triangle read by rows for n >= 0 and 0 <= k <= n.
4
1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 2, 4, 4, 2, 1, 1, 2, 5, 7, 5, 2, 1, 1, 2, 6, 11, 11, 6, 2, 1, 1, 2, 7, 16, 21, 16, 7, 2, 1, 1, 2, 8, 22, 36, 36, 22, 8, 2, 1, 1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1, 1, 2, 10, 37, 85, 127, 127, 85, 37, 10, 2, 1
OFFSET
0,5
COMMENTS
Pascal's pyramid is defined by recurrence. P(0) is Pascal's triangle. Now assume P(n-1) already constructed. Then P(n) is found by the steps: (1) Add 1 to each term of P(n-1). (2) Add at the left and at the right side a diagonal consisting all of 1s and complement the top with the rows 1 and 1, 1. A similar construction starting from the Pascal's triangle and subtracting 1 from all terms leads to A014473.
FORMULA
T(n, k) = binomial(n-2, k-1) + 1 if n != 1 else 1.
G.f.: (1 + 3*y + y^2 + x^4*y^2*(1 + y)^2 + x^2*y*(2 + 5*y + 2*y^2) - x^3*y*(1 + 4*y + 4*y^2 + y^3) - x*(1 + 5*y + 5*y^2 + y^3)/((1 - x)*(1 + y)^2*(1 - x*y)*(1 - x - x*y)). - Stefano Spezia, Sep 26 2024
From G. C. Greubel, Sep 26 2024: (Start)
T(n, n-k) = T(n, k) (symmetry).
T(2*n, n) = A323230(n).
Sum_{k=0..n} (-1)^k*T(n, k) = (n+1 mod 2) - [n=2].
Sum_{k=0..floor(n/2)} T(n-k, k) = Fibonacci(n-2) + (1/4)*(2*n + 3 + (-1)^n) +[n=0] - [n=1]. (End)
EXAMPLE
Triangle starts:
1
1, 1
1, 2, 1
1, 2, 2, 1
1, 2, 3, 2, 1
1, 2, 4, 4, 2, 1
1, 2, 5, 7, 5, 2, 1
1, 2, 6, 11, 11, 6, 2, 1
1, 2, 7, 16, 21, 16, 7, 2, 1
1, 2, 8, 22, 36, 36, 22, 8, 2, 1
1, 2, 9, 29, 57, 71, 57, 29, 9, 2, 1
MAPLE
T := (n, k) -> `if`(n=1, 1, binomial(n-2, k-1) + 1):
seq(seq(T(n, k), k=0..n), n=0..10);
# Alternative:
T := proc(n, k) option remember;
if k = n then return 1 fi; if k < 2 then return k+1 fi;
T(n-1, k-1) + T(n-1, k) - 1 end:
seq(seq(T(n, k), k=0..n), n=0..10);
MATHEMATICA
A323211[n_, k_]:= If[n<2, 1, Binomial[n-2, k-1] +1];
Table[A323211[n, k], {n, 0, 13}, {k, 0, n}]//Flatten (* G. C. Greubel, Sep 26 2024 *)
PROG
(Magma)
A323211:= func< n, k | n le 1 select 1 else 1 + Binomial(n-2, k-1) >;
[A323211(n, k): k in [0..n], n in [0..13]]; // G. C. Greubel, Sep 26 2024
(SageMath)
def A323211(n, k): return 1 if (n<2) else 1 + binomial(n-2, k-1)
flatten([[A323211(n, k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Sep 26 2024
CROSSREFS
Differs from A323231 only in the second term.
Row sums are A323227.
Sequence in context: A087062 A204026 A300119 * A110537 A144434 A322057
KEYWORD
nonn,tabl,easy
AUTHOR
Peter Luschny, Feb 11 2019
STATUS
approved