cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A028326 Twice Pascal's triangle A007318: T(n,k) = 2*C(n,k).

This page as a plain text file.
%I A028326 #73 Jul 15 2024 10:22:24
%S A028326 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,
%T A028326 14,42,70,70,42,14,2,2,16,56,112,140,112,56,16,2,2,18,72,168,252,252,
%U A028326 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
%N A028326 Twice Pascal's triangle A007318: T(n,k) = 2*C(n,k).
%C A028326 Also number of binary vectors of length n+1 with k+1 runs (1 <= k <= n).
%C A028326 If the last two entries in each row are removed and 0 replaces the entries in a checkerboard pattern, we obtain
%C A028326   2;
%C A028326   0,  6;
%C A028326   2,  0, 12;
%C A028326   0, 10,  0,  20;
%C A028326   2,  0, 30,   0,  30;
%C A028326   0, 14,  0,  70,   0,  42;
%C A028326   2,  0, 56,   0, 140,   0, 56;
%C A028326   0, 18,  0, 168,   0, 252,  0, 72;
%C A028326   ...
%C A028326 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
%C A028326 From _Roger Ford_, Jul 06 2023: (Start)
%C A028326 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).
%C A028326 Example of closed meanders with 4 top arches and 5 exterior arches:
%C A028326    exterior arches are top arches or bottom arches without a covering arch
%C A028326    /\ = top arch length 1, \/ = bottom arch length 1
%C A028326       __                        __      __
%C A028326      /  \       Top: /\=3      /  \    /  \   Top: /\=2
%C A028326 /\  / /\ \  /\                / /\ \  / /\ \
%C A028326 \ \/ /  \ \/ /  Bottom: \/=2  \/  \ \/ /  \/  Bottom: /\=3
%C A028326  \__/    \__/   k=5-5=0            \__/       k=5-5=0          T(4,0) = 2
%C A028326       ______                    __
%C A028326      /      \   Top: /\=3      /  \           Top: /\=3
%C A028326 /\  / /\  /\ \                / /\ \  /\  /\
%C A028326 \ \/ /  \/  \/  Bottom: \/=3  \/  \ \/  \/ /  Bottom: \/=3
%C A028326  \__/           k=6-5=1            \______/   k=6-5=1
%C A028326   ______                                __
%C A028326  /      \       Top: /\=3              /  \   Top: /\=3
%C A028326 / /\  /\ \  /\                /\  /\  / /\ \
%C A028326 \/  \/  \ \/ /  Bottom: \/=3  \ \/  \/ /  \/  Bottom: \/=3
%C A028326          \__/   k=6-5=1        \______/       k=6-5=1         T(4,1) = 4
%C A028326   __________
%C A028326  /          \   Top: /\=3
%C A028326 / /\  /\  /\ \                 /\  /\  /\  /\ Top: /\=4
%C A028326 \/  \/  \/  \/  Bottom: \/=4   \ \/  \/  \/ / Bottom: ||=3
%C A028326                 k=7-5=2         \__________/  k=7-5=2         T(4,2) = 2.
%C A028326 (End)
%D A028326 I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 76.
%H A028326 Reinhard Zumkeller, <a href="/A028326/b028326.txt">Rows n=0..150 of triangle, flattened</a>
%H A028326 R. J. Mathar, <a href="http://arxiv.org/abs/1311.6135">Paving rectangular regions with rectangular tiles: tatami and non-tatami tilings</a>, arXiv:1311.6135 [math.CO], 2013, Table 48.
%H A028326 Franck Ramaharo, <a href="https://arxiv.org/abs/1802.07701">Statistics on some classes of knot shadows</a>, arXiv:1802.07701 [math.CO], 2018.
%H A028326 <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F A028326 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
%e A028326 Triangle begins:
%e A028326   2;
%e A028326   2,  2;
%e A028326   2,  4,   2;
%e A028326   2,  6,   6,   2;
%e A028326   2,  8,  12,   8,   2;
%e A028326   2, 10,  20,  20,  10,    2;
%e A028326   2, 12,  30,  40,  30,   12,    2;
%e A028326   2, 14,  42,  70,  70,   42,   14,    2;
%e A028326   2, 16,  56, 112, 140,  112,   56,   16,   2;
%e A028326   2, 18,  72, 168, 252,  252,  168,   72,  18,   2;
%e A028326   2, 20,  90, 240, 420,  504,  420,  240,  90,  20,   2;
%e A028326   2, 22, 110, 330, 660,  924,  924,  660, 330, 110,  22,  2;
%e A028326   2, 24, 132, 440, 990, 1584, 1848, 1584, 990, 440, 132, 24, 2;
%p A028326 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:
%p A028326 for n from 0 to 13 do seq(T(n, k), k=0..n) od; # _Zerinvary Lajos_, Dec 16 2006
%t A028326 Table[2*Binomial[n, k], {n, 0, 11}, {k, 0, n}]//Flatten (* _Robert G. Wilson v_, Mar 05 2012 *)
%o A028326 (Haskell)
%o A028326 a028326 n k = a028326_tabl !! n !! k
%o A028326 a028326_row n = a028326_tabl !! n
%o A028326 a028326_tabl = iterate
%o A028326    (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2]
%o A028326 -- _Reinhard Zumkeller_, Mar 12 2012
%o A028326 (PARI) T(n,k) = 2*binomial(n,k) \\ _Charles R Greathouse IV_, Feb 07 2017
%o A028326 (Python)
%o A028326 from sympy import binomial
%o A028326 def T(n, k):
%o A028326     return 2*binomial(n, k)
%o A028326 for n in range(21): print([T(n, k) for k in range(n + 1)]) # _Indranil Ghosh_, Apr 29 2017
%o A028326 (Magma) [2*Binomial(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Apr 27 2021
%o A028326 (Sage) flatten([[2*binomial(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Apr 27 2021
%Y A028326 Cf. A007318, A028327, A028328, A028329, A028330, A028331, A028332, A124927, A134058.
%K A028326 nonn,tabl,easy,nice
%O A028326 0,1
%A A028326 _Mohammad K. Azarian_
%E A028326 More terms from Donald Manchester, Jr. (s1199170(AT)cedarnet.cedarville.edu)