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.

Showing 1-6 of 6 results.

A034868 Left half of Pascal's triangle.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 6, 1, 5, 10, 1, 6, 15, 20, 1, 7, 21, 35, 1, 8, 28, 56, 70, 1, 9, 36, 84, 126, 1, 10, 45, 120, 210, 252, 1, 11, 55, 165, 330, 462, 1, 12, 66, 220, 495, 792, 924, 1, 13, 78, 286, 715, 1287, 1716, 1, 14, 91, 364, 1001, 2002, 3003, 3432, 1, 15
Offset: 0

Views

Author

Keywords

Examples

			1;
1;
1, 2;
1, 3;
1, 4,  6;
1, 5, 10;
1, 6, 15, 20;
...
		

Crossrefs

Cf. A007318, A107430, A062344, A122366, A027306 (row sums).
Cf. A008619.
Cf. A225860.
Cf. A126257.
Cf. A034869 (right half), A014413, A014462, A265848.

Programs

  • Haskell
    a034868 n k = a034868_tabf !! n !! k
    a034868_row n = a034868_tabf !! n
    a034868_tabf = map reverse a034869_tabf
    -- Reinhard Zumkeller, improved Dec 20 2015, Jul 27 2012
    
  • Mathematica
    Flatten[ Table[ Binomial[n, k], {n, 0, 15}, {k, 0, Floor[n/2]}]] (* Robert G. Wilson v, May 28 2005 *)
  • PARI
    for(n=0, 14, for(k=0, floor(n/2), print1(binomial(n, k),", ");); print();) \\ Indranil Ghosh, Mar 31 2017
    
  • Python
    import math
    from sympy import binomial
    for n in range(15):
        print([binomial(n, k) for k in range(int(math.floor(n/2)) + 1)]) # Indranil Ghosh, Mar 31 2017
    
  • Python
    from itertools import count, islice
    def A034868_gen(): # generator of terms
        yield from (s:=(1,))
        for i in count(0):
            yield from (s:=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + ((s[-1]<<1,) if i&1 else ()))
    A034868_list = list(islice(A034868_gen(),30)) # Chai Wah Wu, Oct 17 2023

Formula

T(n,k) = A034869(n,floor(n/2)-k), k = 0..floor(n/2). - Reinhard Zumkeller, Jul 27 2012

A034869 Right half of Pascal's triangle.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 6, 4, 1, 10, 5, 1, 20, 15, 6, 1, 35, 21, 7, 1, 70, 56, 28, 8, 1, 126, 84, 36, 9, 1, 252, 210, 120, 45, 10, 1, 462, 330, 165, 55, 11, 1, 924, 792, 495, 220, 66, 12, 1, 1716, 1287, 715, 286, 78, 13, 1, 3432, 3003, 2002, 1001, 364, 91, 14, 1
Offset: 0

Views

Author

Keywords

Comments

From R. J. Mathar, May 13 2006: (Start)
Also flattened table of the expansion coefficients of x^n in Chebyshev Polynomials T_k(x) of the first kind:
x^n is 2^(1-n) multiplied by the sum of floor(1+n/2) terms using only terms T_k(x) with even k if n even, only terms T_k(x) with odd k if n is odd and halving the coefficient a(..) in front of any T_0(x):
x^0=2^(1-0) a(0)/2 T_0(x)
x^1=2^(1-1) a(1) T_1(x)
x^2=2^(1-2) [a(2)/2 T_0(x)+a(3) T_2(x)]
x^3=2^(1-3) [a(4) T_1(x)+a(5) T_3(x)]
x^4=2^(1-4) [a(6)/2 T_0(x)+a(7) T_2(x) +a(8) T_4(x)]
x^5=2^(1-5) [a(9) T_1(x)+a(10) T_3(x) +a(11) T_5(x)]
x^6=2^(1-6) [a(12)/2 T_0(x)+a(13) T_2(x) +a(14) T_4(x) +a(15) T_6(x)]
x^7=2^(1-7) [a(16) T_1(x)+a(17) T_3(x) +a(18) T_5(x) +a(19) T_7(x)]" (End)
T(n,k) = A034868(n,floor(n/2)-k), k = 0..floor(n/2). - Reinhard Zumkeller, Jul 27 2012
Rows are binomial(r-1,(2r+1-(-1)^r)\4 -n ) where r is the row and n is the term. Columns are binomial(2m+c-3,m-1) where c is the column and m is the term. - Anthony Browne, May 17 2016

Examples

			The table starts:
  1
  1
  2 1
  3 1
  6 4 1
  ...
		

Crossrefs

Cf. A007318, A008619 (row lengths).
Cf. A110654.
Cf. A034868 (left half), A014413, A014462, A027306 (row sums).
Columns k=0-1-2-3-4 give: A001405, A037955, A037956, A037957, A037958.

Programs

  • Haskell
    a034869 n k = a034869_tabf !! n !! k
    a034869_row n = a034869_tabf !! n
    a034869_tabf = [1] : f 0 [1] where
       f 0 us'@(_:us) = ys : f 1 ys where
                        ys = zipWith (+) us' (us ++ [0])
       f 1 vs@(v:_) = ys : f 0 ys where
                      ys = zipWith (+) (vs ++ [0]) ([v] ++ vs)
    -- Reinhard Zumkeller, improved Dec 21 2015, Jul 27 2012
    
  • Maple
    for n from 0 to 60 do for j from n mod 2 to n by 2 do print( binomial(n,(n-j)/2) ); od; od; # R. J. Mathar, May 13 2006
    # Second program:
    egf:= k-> BesselI(2*k, 2*x) + BesselI(2*k+1, 2*x):
    A034869:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):
    seq(print(seq(A034869(n, k), k=0..iquo(n, 2))), n=0..14); # Mélika Tebni, Sep 05 2024
  • Mathematica
    Table[Binomial[n, k], {n, 0, 14}, {k, Ceiling[n/2], n}] // Flatten (* Michael De Vlieger, May 19 2016 *)
  • PARI
    for(n=0, 14, for(k=ceil(n/2), n, print1(binomial(n, k),", ");); print();) \\ Indranil Ghosh, Mar 31 2017
    
  • Python
    import math
    from sympy import binomial
    for n in range(15):
        print([binomial(n, k) for k in range(math.ceil(n/2), n + 1)]) # Indranil Ghosh, Mar 31 2017

Formula

E.g.f. of column k: BesselI(2*k,2*x) + BesselI(2*k+1,2*x). - Mélika Tebni, Sep 05 2024

Extensions

Keyword fixed and example added by Franklin T. Adams-Watters, May 27 2010

A014413 Triangular array formed from elements to right of middle of Pascal's triangle.

Original entry on oeis.org

1, 1, 3, 1, 4, 1, 10, 5, 1, 15, 6, 1, 35, 21, 7, 1, 56, 28, 8, 1, 126, 84, 36, 9, 1, 210, 120, 45, 10, 1, 462, 330, 165, 55, 11, 1, 792, 495, 220, 66, 12, 1, 1716, 1287, 715, 286, 78, 13, 1, 3003, 2002, 1001, 364, 91, 14, 1, 6435, 5005, 3003, 1365, 455, 105, 15, 1
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins as:
    1;
    1;
    3,   1;
    4,   1;
   10,   5,   1;
   15,   6,   1;
   35,  21,   7,  1;
   56,  28,   8,  1;
  126,  84,  36,  9,  1;
  210, 120,  45, 10,  1;
  462, 330, 165, 55, 11, 1;
  792, 495, 220, 66, 12, 1;
  ...
		

Crossrefs

Programs

  • Haskell
    a014413 n k = a014413_tabf !! (n-1) !! (k-1)
    a014413_row n = a014413_tabf !! (n-1)
    a014413_tabf = [1] : f 1 [1] where
       f 0 us'@(_:us) = ys : f 1 ys where
                        ys = zipWith (+) us' (us ++ [0])
       f 1 vs@(v:_) = ys' : f 0 ys where
                      ys@(_:ys') = zipWith (+) (vs ++ [0]) ([v] ++ vs)
    -- Reinhard Zumkeller, Dec 24 2015
  • Mathematica
    Table[Binomial[n,k],{n,15},{k,Ceiling[(n+1)/2],n}]//Flatten  (* Stefano Spezia, Jan 16 2025 *)

Extensions

More terms from James Sellers

A265848 Pascal's triangle, right and left halves interchanged.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 1, 1, 3, 4, 1, 1, 4, 6, 10, 5, 1, 1, 5, 10, 15, 6, 1, 1, 6, 15, 20, 35, 21, 7, 1, 1, 7, 21, 35, 56, 28, 8, 1, 1, 8, 28, 56, 70, 126, 84, 36, 9, 1, 1, 9, 36, 84, 126, 210, 120, 45, 10, 1, 1, 10, 45, 120, 210, 252, 462, 330, 165, 55, 11, 1, 1, 11, 55, 165, 330, 462
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 24 2015

Keywords

Comments

Concatenations of rows of A014413 and A034868.
Alternative mirrored variant: concatenation of A034869 and A014462.

Examples

			.   0:                                1
.   1:                              1   1
.   2:                            1   1   2
.   3:                          3   1   1   3
.   4:                        4   1   1   4   6
.   5:                     10   5   1   1   5   10
.   6:                   15   6   1   1   6   15  20
.   7:                 35   21  7   1   1   7   21   35
.   8:              56   28   8   1   1   8   28  56   70
.   9:           126   84   36  9   1   1   9   36   84   126
.  10:        210   120  45  10   1   1   10  45  120  210  252
.  11:     462   330  165   55  11  1   1   11  55  165   330  462
.  12:  792   495  220   66  12   1   1   12  66  220  495  792   924  .
		

Crossrefs

Cf. A014413, A014462, A034868, A034869, A007318, A001405, A037952, A000079 (row sums), A001142 (row products).

Programs

  • Haskell
    a265848 n k = a265848_tabl !! n !! k
    a265848_row n = a265848_tabl !! n
    a265848_tabl = zipWith (++) ([] : a014413_tabf) a034868_tabf
  • Mathematica
    row[n_] := Binomial[n, Join[Range[Floor[n/2] + 1, n], Range[0, Floor[n/2]]]]; Array[row, 12, 0] // Flatten (* Amiram Eldar, May 13 2025 *)

Formula

T(n,k) = A007318(n, (k + floor((n+2)/2)) mod (n+1)).
T(n,k) = if k <= [(n+1)/2] then A014413(n,k+1) else A034868(n,k-[(n+1)/2]).
T(n,0) = A037952(n) for n > 0.
T(n,n) = A001405(n).

A117178 Riordan array (c(x^2)/sqrt(1-4*x^2), x*c(x^2)), c(x) the g.f. of A000108.

Original entry on oeis.org

1, 0, 1, 3, 0, 1, 0, 4, 0, 1, 10, 0, 5, 0, 1, 0, 15, 0, 6, 0, 1, 35, 0, 21, 0, 7, 0, 1, 0, 56, 0, 28, 0, 8, 0, 1, 126, 0, 84, 0, 36, 0, 9, 0, 1, 0, 210, 0, 120, 0, 45, 0, 10, 0, 1, 462, 0, 330, 0, 165, 0, 55, 0, 11, 0, 1, 0, 792, 0, 495, 0, 220, 0, 66, 0, 12, 0, 1
Offset: 0

Views

Author

Paul Barry, Mar 01 2006

Keywords

Comments

Row sums are A058622(n+1). Diagonal sums are A001791(n+1), with interpolated zeros. Inverse is A117179.
De-aerated and rows reversed, this matrix apparently becomes A014462. The nonzero antidiagonals are embedded in several entries and apparently contain partial sums of previous nonzero antidiagonals. - Tom Copeland, May 30 2017

Examples

			Triangle begins
    1;
    0,  1;
    3,  0,  1;
    0,  4,  0,  1;
   10,  0,  5,  0,  1;
    0, 15,  0,  6,  0,  1;
   35,  0, 21,  0,  7,  0,  1;
    0, 56,  0, 28,  0,  8,  0,  1;
  126,  0, 84,  0, 36,  0,  9,  0,  1;
		

Crossrefs

Programs

  • Magma
    [(1+(-1)^(n-k))*Binomial(n+1, Floor((n-k)/2))/2: k in [0..n], n in [0..15]]; // G. C. Greubel, Aug 08 2022
    
  • Mathematica
    T[n_, k_]:= Binomial[n+1, (n-k)/2]*(1+(-1)^(n-k))/2;
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 08 2022 *)
  • SageMath
    def A117178(n,k): return (1 + (-1)^(n-k))*binomial(n+1, (n-k)//2)/2
    flatten([[A117178(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Aug 08 2022

Formula

T(n,k) = C(n+1, (n-k)/2) * (1 + (-1)^(n-k))/2.
Column k has e.g.f. Bessel_I(k,2x) + Bessel_I(k+2, 2x).
From G. C. Greubel, Aug 08 2022: (Start)
Sum_{k=0..n} T(n, k) = A058622(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = ((1+(-1)^n)/2) * A001791((n+2)/2).
T(2*n, n) = ((1+(-1)^n)/2) * A052203(n/2).
T(2*n+1, n) = ((1-(-1)^n)/2) * A224274((n+1)/2).
T(2*n-1, n-1) = ((1+(-1)^n)/2) * A224274(n/2). (End)

A014463 Triangular array formed from elements to left of middle of rows of Pascal's triangle that are not 1.

Original entry on oeis.org

3, 4, 5, 10, 6, 15, 7, 21, 35, 8, 28, 56, 9, 36, 84, 126, 10, 45, 120, 210, 11, 55, 165, 330, 462, 12, 66, 220, 495, 792, 13, 78, 286, 715, 1287, 1716, 14, 91, 364, 1001, 2002, 3003, 15, 105, 455, 1365, 3003, 5005, 6435, 16, 120, 560, 1820, 4368, 8008, 11440
Offset: 1

Views

Author

Keywords

Comments

A014462 without the first column.

Examples

			3;
4;
5, 10;
6, 15;
7, 21, 35;
8, 28, 56;
9, 36, 84, 126;
10, 45, 120, 210;
11, 55, 165, 330, 462;
		

Crossrefs

Cf. A014411.

Extensions

More terms from James Sellers
Offset corrected by Mohammad K. Azarian, Nov 19 2008
Showing 1-6 of 6 results.