[go: up one dir, main page]

login
A028326
Twice Pascal's triangle A007318: T(n,k) = 2*C(n,k).
15
2, 2, 2, 2, 4, 2, 2, 6, 6, 2, 2, 8, 12, 8, 2, 2, 10, 20, 20, 10, 2, 2, 12, 30, 40, 30, 12, 2, 2, 14, 42, 70, 70, 42, 14, 2, 2, 16, 56, 112, 140, 112, 56, 16, 2, 2, 18, 72, 168, 252, 252, 168, 72, 18, 2, 2, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2, 2, 22, 110, 330, 660, 924, 924, 660, 330, 110, 22, 2
OFFSET
0,1
COMMENTS
Also number of binary vectors of length n+1 with k+1 runs (1 <= k <= n).
If the last two entries in each row are removed and 0 replaces the entries in a checkerboard pattern, we obtain
2;
0, 6;
2, 0, 12;
0, 10, 0, 20;
2, 0, 30, 0, 30;
0, 14, 0, 70, 0, 42;
2, 0, 56, 0, 140, 0, 56;
0, 18, 0, 168, 0, 252, 0, 72;
...
This plays the same role of recurrence coefficients for second differences of polynomials as triangle A074909 plays for the first differences. - R. J. Mathar, Jul 03 2013
From Roger Ford, Jul 06 2023: (Start)
T(n,k) = the number of closed meanders with n top arches, n+1 exterior arches and with k = the number of arches of length 1 - (n+1).
Example of closed meanders with 4 top arches and 5 exterior arches:
exterior arches are top arches or bottom arches without a covering arch
/\ = top arch length 1, \/ = bottom arch length 1
__ __ __
/ \ Top: /\=3 / \ / \ Top: /\=2
/\ / /\ \ /\ / /\ \ / /\ \
\ \/ / \ \/ / Bottom: \/=2 \/ \ \/ / \/ Bottom: /\=3
\__/ \__/ k=5-5=0 \__/ k=5-5=0 T(4,0) = 2
______ __
/ \ Top: /\=3 / \ Top: /\=3
/\ / /\ /\ \ / /\ \ /\ /\
\ \/ / \/ \/ Bottom: \/=3 \/ \ \/ \/ / Bottom: \/=3
\__/ k=6-5=1 \______/ k=6-5=1
______ __
/ \ Top: /\=3 / \ Top: /\=3
/ /\ /\ \ /\ /\ /\ / /\ \
\/ \/ \ \/ / Bottom: \/=3 \ \/ \/ / \/ Bottom: \/=3
\__/ k=6-5=1 \______/ k=6-5=1 T(4,1) = 4
__________
/ \ Top: /\=3
/ /\ /\ /\ \ /\ /\ /\ /\ Top: /\=4
\/ \/ \/ \/ Bottom: \/=4 \ \/ \/ \/ / Bottom: ||=3
k=7-5=2 \__________/ k=7-5=2 T(4,2) = 2.
(End)
REFERENCES
I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 76.
FORMULA
G.f. for the number of length n binary words with k runs: (1-x+x*y)/(1-x-x*y) [Goulden and Jackson]. - Geoffrey Critzer, Mar 04 2012
EXAMPLE
Triangle begins:
2;
2, 2;
2, 4, 2;
2, 6, 6, 2;
2, 8, 12, 8, 2;
2, 10, 20, 20, 10, 2;
2, 12, 30, 40, 30, 12, 2;
2, 14, 42, 70, 70, 42, 14, 2;
2, 16, 56, 112, 140, 112, 56, 16, 2;
2, 18, 72, 168, 252, 252, 168, 72, 18, 2;
2, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2;
2, 22, 110, 330, 660, 924, 924, 660, 330, 110, 22, 2;
2, 24, 132, 440, 990, 1584, 1848, 1584, 990, 440, 132, 24, 2;
MAPLE
T := proc(n, k) if k=0 then 2 elif k>n then 0 else T(n-1, k)+T(n-1, k-1) fi end:
for n from 0 to 13 do seq(T(n, k), k=0..n) od; # Zerinvary Lajos, Dec 16 2006
MATHEMATICA
Table[2*Binomial[n, k], {n, 0, 11}, {k, 0, n}]//Flatten (* Robert G. Wilson v, Mar 05 2012 *)
PROG
(Haskell)
a028326 n k = a028326_tabl !! n !! k
a028326_row n = a028326_tabl !! n
a028326_tabl = iterate
(\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2]
-- Reinhard Zumkeller, Mar 12 2012
(PARI) T(n, k) = 2*binomial(n, k) \\ Charles R Greathouse IV, Feb 07 2017
(Python)
from sympy import binomial
def T(n, k):
return 2*binomial(n, k)
for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Apr 29 2017
(Magma) [2*Binomial(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 27 2021
(Sage) flatten([[2*binomial(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 27 2021
KEYWORD
nonn,tabl,easy,nice
EXTENSIONS
More terms from Donald Manchester, Jr. (s1199170(AT)cedarnet.cedarville.edu)
STATUS
approved