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-10 of 15 results. Next

A130047 Left half of Pascal's triangle (A034868) modulo 2.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Oct 10 2007

Keywords

Comments

Row sums yield: 1, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 8, 1, 2, 2, 4, 2, 4, 4, 8, ...(see A048896).

Examples

			Triangle begins:
1,
1,
1, 0,
1, 1,
1, 0, 0,
1, 1, 0,
1, 0, 1, 0,
1, 1, 1, 1,
1, 0, 0, 0, 0,
1, 1, 0, 0, 0,
1, 0, 1, 0, 0, 0,
1, 1, 1, 1, 0, 0,
1, 0, 0, 0, 1, 0, 0,
1, 1, 0, 0, 1, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 0, 0, 0, 0, 0, 0,
...
Triangle (right aligned) begins:
                                  1,
                                1,
                              1,  0,
                            1,  1,
                          1,  0,  0,
                        1,  1,  0,
                      1,  0,  1,  0,
                    1,  1,  1,  1,
                  1,  0,  0,  0,  0,
                1,  1,  0,  0,  0,
              1,  0,  1,  0,  0,  0,
            1,  1,  1,  1,  0,  0,
          1,  0,  0,  0,  1,  0,  0,
        1,  1,  0,  0,  1,  1,  0,
      1,  0,  1,  0,  1,  0,  1,  0,
    1,  1,  1,  1,  1,  1,  1,  1,
  1,  0,  0,  0,  0,  0,  0,  0,  0,
1,  1,  0,  0,  0,  0,  0,  0,  0,
...
		

Crossrefs

Programs

  • Maple
    # From N. J. A. Sloane, Mar 22 2015:
    for n from 0 to 20 do
    lprint(seq(binomial(n,k) mod 2, k=0..floor(n/2))); od:
    # For row sums:
    f:=n->add(binomial(n,k) mod 2, k=0..floor(n/2));
    [seq(f(n),n=0..60)];
  • Mathematica
    Table[Mod[Binomial[n, k], 2], {n, 0, 10}, {k, 0, Floor[n/2]}] (* G. C. Greubel, Aug 12 2017 *)

Formula

T(n,k) = mod(binomial(n, k), 2), 0 <= k <= floor(n/2). - G. C. Greubel, Aug 12 2017

Extensions

Corrected by N. J. A. Sloane, Mar 22 2015 at the suggestion of Kevin Ryde

A046899 Triangle in which n-th row is {binomial(n+k,k), k=0..n}, n >= 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 1, 4, 10, 20, 1, 5, 15, 35, 70, 1, 6, 21, 56, 126, 252, 1, 7, 28, 84, 210, 462, 924, 1, 8, 36, 120, 330, 792, 1716, 3432, 1, 9, 45, 165, 495, 1287, 3003, 6435, 12870, 1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48620, 1, 11, 66, 286, 1001
Offset: 0

Views

Author

Keywords

Comments

C(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (1,0) and (0,1). - Joerg Arndt, Jul 01 2011
Row sums are A001700.
T(n, k) is also the number of order-preserving full transformations (of an n-chain) of waist k (waist(alpha) = max(Im(alpha))). - Abdullahi Umar, Oct 02 2008
If T(r,c), r=0,1,2,..., c=1,2,...,(r+1), are the triangle elements, then for r > 0, T(r,c) = binomial(r+c-1,c-1) = M(r,c) is the number of monotonic mappings from an ordered set of r elements into an ordered set of c elements. For example, there are 15 monotonic mappings from an ordered set of 4 elements into an ordered set of 3 elements. For c > r+1, use the identity M(r,c) = M(c-1,r+1) = T(c-1,r+1). For example, there are 210 monotonic mappings from an ordered set of 4 elements into an ordered set of 7 elements, because M(4,7) = T(6,5) = 210. Number of monotonic endomorphisms in a set of r elements, M(r,r), therefore appear on the second diagonal of the triangle which coincides with A001700. - Stanislav Sykora, May 26 2012
Start at the origin. Flip a fair coin to determine steps of (1,0) or (0,1). Stop when you are a (perpendicular) distance of n steps from the x axis or the y axis. For k = 0,1,...,n-1, C(n-1,k)/2^(n+k) is the probability that you will stop on the point (n,k). This is equal to the probability that you will stop on the point (k,n). Hence, Sum_{k=0..n} C(n,k)/2^(n+k) = 1. - Geoffrey Critzer, May 13 2017

Examples

			The triangle is the lower triangular part of the square array:
  1|  1,  1,   1,   1,    1,    1,     1,     1,     1, ...
  1,  2|  3,   4,   5,    6,    7,     8,     9,    10, ...
  1,  3,  6|  10,  15,   21,   28,    36,    45,    55, ...
  1,  4, 10,  20|  35,   56,   84,   120,   165,   220, ...
  1,  5, 15,  35,  70|  126,  210,   330,   495,   715, ...
  1,  6, 21,  56, 126,  252|  462,   792,  1287,  2002, ...
  1,  7, 28,  84, 210,  462,  924|  1716,  3003,  5005, ...
  1,  8, 36, 120, 330,  792, 1716,  3432|  6435, 11440, ...
  1,  9, 45, 165, 495, 1287, 3003,  6435, 12870| 24310, ...
  1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48620| ...
The array read by antidiagonals gives the binomial triangle.
From _Reinhard Zumkeller_, Jul 27 2012: (Start)
Take the first n elements of the n-th diagonal (NW to SE) of left half of Pascal's triangle and write it as n-th row on the triangle on the right side, see above
  0:                 1                    1
  1:               1   _                  1  2
  2:             1   2  __                1  3  6
  3:           1   3  __  __              1  4 10 20
  4:         1   4   6  __  __            1  5 15 35 70
  5:       1   5  10  __  __  __          1  6 21 56 .. ..
  6:     1   6  15  20  __  __  __        1  7 28 .. .. .. ..
  7:   1   7  21  35  __  __  __  __      1  8 .. .. .. .. .. ..
  8: 1   8  28  56  70  __  __  __  __    1 .. .. .. .. .. .. .. .. (End)
		

References

  • H. W. Gould, A class of binomial sums and a series transform, Utilitas Math., 45 (1994), 71-83.

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a046899 n k = a046899_tabl !! n !! k
    a046899_row n = a046899_tabl !! n
    a046899_tabl = zipWith take [1..] $ transpose a007318_tabl
    -- Reinhard Zumkeller, Jul 27 2012
    
  • Magma
    /* As triangle */ [[Binomial(n+k, n): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Aug 18 2015
    
  • Maple
    for n from 0 to 10 do seq( binomial(n+m,n), m = 0 .. n) od; # Zerinvary Lajos, Dec 09 2007
  • Mathematica
    t[n_, k_] := Binomial[n + k, n]; Table[t[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Aug 12 2013 *)
  • PARI
    /* same as in A092566 but use */
    steps=[[1, 0], [1, 0] ];
    /* Joerg Arndt, Jul 01 2011 */
    
  • SageMath
    for n in (0..9):
        print([multinomial(n, k) for k in (0..n)]) # Peter Luschny, Dec 24 2020

Formula

T(n,k) = A092392(n,n-k), k = 0..n. - Reinhard Zumkeller, Jul 27 2012
T(n,k) = A178300(n,k), n>0, k = 1..n. - L. Edson Jeffery, Jul 23 2014
T(n,k) = (n + 1)*hypergeom([-n, 1 - k], [2], 1). - Peter Luschny, Jan 09 2022
T(n,k) = hypergeom([-n, -k], [1], 1). - Peter Luschny, Mar 21 2024
G.f.: 1/((1-2x*y*C(x*y))*(1-x*C(x*y))), where C(x) is the g.f. for A000108, the Catalan numbers. - Michael D. Weiner, Jul 31 2024

Extensions

More terms from James Sellers

A107430 Triangle read by rows: row n is row n of Pascal's triangle (A007318) sorted into increasing order.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, May 21 2005

Keywords

Comments

By rows, equals partial sums of A053121 reversed rows. Example: Row 4 of A053121 = (2, 0, 3, 0, 1) -> (1, 0, 3, 0, 2) -> (1, 1, 4, 4, 6). - Gary W. Adamson, Dec 28 2008, edited by Michel Marcus, Sep 22 2015

Examples

			Triangle begins:
1;
1,1;
1,1,2;
1,1,3,3;
1,1,4,4,6;
		

Crossrefs

A061554 is similar but with rows sorted into decreasing order.
Cf. A034868.
Cf. A053121. - Gary W. Adamson, Dec 28 2008
Cf. A103284.

Programs

  • Haskell
    import Data.List (sort)
    a107430 n k = a107430_tabl !! n !! k
    a107430_row n = a107430_tabl !! n
    a107430_tabl = map sort a007318_tabl
    -- Reinhard Zumkeller, May 26 2013
    
  • Magma
    /* As triangle */ [[Binomial(n,Floor(k/2)) : k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 22 2015
    
  • Maple
    for n from 0 to 10 do sort([seq(binomial(n,k),k=0..n)]) od; # yields sequence in triangular form. - Emeric Deutsch, May 28 2005
  • Mathematica
    Flatten[ Table[ Sort[ Table[ Binomial[n, k], {k, 0, n}]], {n, 0, 12}]] (* Robert G. Wilson v, May 28 2005 *)
  • PARI
    for(n=0,20, for(k=0,n, print1(binomial(n,floor(k/2)), ", "))) \\ G. C. Greubel, May 22 2017

Formula

T(n,k) = C(n,floor(k/2)). - Paul Barry, Dec 15 2006; corrected by Philippe Deléham, Mar 15 2007
Sum_{k=0..n} T(n,k)*x^(n-k) = A127363(n), A127362(n), A127361(n), A126869(n), A001405(n), A000079(n), A127358(n), A127359(n), A127360(n) for x=-4,-3,-2,-1,0,1,2,3,4 respectively. - Philippe Deléham, Mar 29 2007

Extensions

More terms from Emeric Deutsch and Robert G. Wilson v, May 28 2005

A122366 Triangle read by rows: T(n,k) = binomial(2*n+1,k), 0 <= k <= n.

Original entry on oeis.org

1, 1, 3, 1, 5, 10, 1, 7, 21, 35, 1, 9, 36, 84, 126, 1, 11, 55, 165, 330, 462, 1, 13, 78, 286, 715, 1287, 1716, 1, 15, 105, 455, 1365, 3003, 5005, 6435, 1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 1, 21
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 30 2006

Keywords

Comments

Sum of n-th row = A000302(n) = 4^n.
Central terms give A052203.
Reversal of A111418. - Philippe Deléham, Mar 22 2007
Coefficient triangle for the expansion of one half of odd powers of 2*x in terms of Chebyshev's T-polynomials: ((2*x)^(2*n+1))/2 = Sum_{k=0..n} a(n,k)*T(2*(n-k)+1,x) with Chebyshev's T-polynomials. See A053120. - Wolfdieter Lang, Mar 07 2007
The signed triangle T(n,k)*(-1)^(n-k) appears in the formula ((2*sin(phi))^(2*n+1))/2 = Sum_{k=0..n} ((-1)^(n-k))*a(n,k)*sin((2*(n-k)+1)*phi). - Wolfdieter Lang, Mar 07 2007
The signed triangle T(n,k)*(-1)^(n-k) appears therefore in the formula (4-x^2)^n = Sum_{k=0..n} ((-1)^(n-k))*a(n,k)*S(2*(n-k),x) with Chebyshev's S-polynomials. See A049310 for S(n,x). - Wolfdieter Lang, Mar 07 2007
From Wolfdieter Lang, Sep 18 2012: (Start)
The triangle T(n,k) appears also in the formula F(2*l+1)^(2*n+1) = (1/5^n)*Sum_{k=0..n} T(n,k)*F((2*(n-k)+1)*(2*l+1)), l >= 0, n >= 0, with F=A000045 (Fibonacci).
The signed triangle Ts(n,k):=T(n,k)*(-1)^k appears also in the formula
F(2*l)^(2*n+1) = (1/5^n)*Sum_{k=0..n} Ts(n,k)*F((2(n-k)+1)*2*l), l >= 0, n >= 0, with F=A000045 (Fibonacci).
This is Lemma 2 of the K. Ozeki reference, p. 108, written for odd and even indices separately.
(End)

Examples

			.......... / 1 \ .......... =A062344(0,0)=A034868(0,0),
......... / 1 . \ ......... =T(0,0)=A034868(1,0),
........ / 1 2 . \ ........ =A062344(1,0..1)=A034868(2,0..1),
....... / 1 3 ... \ ....... =T(1,0..1)=A034868(3,0..1),
...... / 1 4 6 ... \ ...... =A062344(2,0..2)=A034868(4,0..2),
..... / 1 5 10 .... \ ..... =T(2,0..2)=A034868(5,0..2),
.... / 1 6 15 20 ... \ .... =A062344(3,0..3)=A034868(6,0..3),
... / 1 7 21 35 ..... \ ... =T(3,0..3)=A034868(7,0..3),
.. / 1 8 28 56 70 .... \ .. =A062344(4,0..4)=A034868(8,0..4),
. / 1 9 36 84 126 ..... \ . =T(4,0..4)=A034868(9,0..4).
Row n=2:[1,5,10] appears in the expansion ((2*x)^5)/2 = T(5,x)+5*T(3,x)+10*T(1,x).
Row n=2:[1,5,10] appears in the expansion ((2*cos(phi))^5)/2 = cos(5*phi)+5*cos(3*phi)+10*cos(1*phi).
The signed row n=2:[1,-5,10] appears in the expansion ((2*sin(phi))^5)/2 = sin(5*phi)-5*sin(3*phi)+10*sin(phi).
The signed row n=2:[1,-5,10] appears therefore in the expansion (4-x^2)^2 = S(4,x)-5*S(2,x)+10*S(0,x).
Triangle T(n,k) starts:
  n\k 0  1   2   3    4     5     6     7     8     9  ...
  0   1
  1   1  3
  2   1  5  10
  3   1  7  21  35
  4   1  9  36  84  126
  5   1 11  55 165  330   462
  6   1 13  78 286  715  1287  1716
  7   1 15 105 455 1365  3003  5005  6435
  8   1 17 136 680 2380  6188 12376 19448 24310
  9   1 19 171 969 3876 11628 27132 50388 75582 92378
  ...  - _Wolfdieter Lang_, Sep 18 2012
Row n=2, with F(n)=A000045(n) (Fibonacci number), l >= 0, see a comment above:
F(2*l)^5   = (1*F(10*l) - 5*F(6*l) + 10*F(2*l))/25,
F(2*l+1)^5 = (1*F(10*l+5) + 5*F(6*l+3) + 10*F(2*l+1))/25.
- _Wolfdieter Lang_, Sep 19 2012
		

References

  • T. J. Rivlin, Chebyshev polynomials: from approximation theory to algebra and number theory, 2nd ed., Wiley, New York, 1990, pp. 54-55, Ex. 1.5.31.

Crossrefs

Cf. A062344.
Odd numbered rows of A008314. Even numbered rows of A008314 are A127673.

Programs

  • Haskell
    a122366 n k = a122366_tabl !! n !! k
    a122366_row n = a122366_tabl !! n
    a122366_tabl = f 1 a007318_tabl where
       f x (_:bs:pss) = (take x bs) : f (x + 1) pss
    -- Reinhard Zumkeller, Mar 14 2014
  • Mathematica
    T[_, 0] = 1;
    T[n_, k_] := T[n, k] = T[n-1, k-1] 2n(2n+1)/(k(2n-k+1));
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *)

Formula

T(n,0)=1; T(n,k) = T(n-1,k-1)*2*n*(2*n+1)/(k*(2*n-k+1)) for k > 0.
T(n,0)=1; for n > 0: T(n,1)=n+2; for n > 1: T(n,n) = T(n-1,n-2) + 3*T(n-1,n-1), T(n,k) = T(n-1,k-2) + 2*T(n-1,k-1) + T(n-1,k), 1 < k < n.
T(n,n) = A001700(n).
T(n,k) = A034868(2*n+1,k) = A007318(2*n+1,k), 0 <= k <= n;
G.f.: (2*y)/((y-1)*sqrt(1-4*x*y)-4*x*y^2+(1-4*x)*y+1). - Vladimir Kruchinin, Oct 30 2020

Extensions

Chebyshev and trigonometric comments from Wolfdieter Lang, Mar 07 2007.
Typo in comments fixed, thanks to Philippe Deléham, who indicated this.

A014631 Numbers in order in which they appear in Pascal's triangle.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

A permutation of the natural numbers. - Robert G. Wilson v, Jun 12 2014
In Pascal's triangle a(n) occurs the first time in row A265912(n). - Reinhard Zumkeller, Dec 18 2015

Crossrefs

Cf. A034868, A119629 (inverse), A265912.

Programs

  • Haskell
    import Data.List (nub)
    a014631 n = a014631_list !! (n-1)
    a014631_list = 1 : (nub $ concatMap tail a034868_tabf)
    -- Reinhard Zumkeller, Dec 19 2015
    
  • Mathematica
    lst = {1}; t = Flatten[Table[Binomial[n, m], {n, 16}, {m, Floor[n/2]}]]; Do[ If[ !MemberQ[lst, t[[n]]], AppendTo[lst, t[[n]] ]], {n, Length@t}]; lst (* Robert G. Wilson v *)
    DeleteDuplicates[Flatten[Table[Binomial[n,m],{n,20},{m,0,Floor[n/2]}]]] (* Harvey P. Dale, Apr 08 2013 *)
  • Python
    from itertools import count, islice
    def A014631_gen(): # generator of terms
        s, c =(1,), set()
        for i in count(0):
            for d in s:
                if d not in c:
                    yield d
                    c.add(d)
            s=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + ((s[-1]<<1,) if i&1 else ())
    A014631_list = list(islice(A014631_gen(),30)) # Chai Wah Wu, Oct 17 2023

Extensions

More terms from Erich Friedman
Offset changed by Reinhard Zumkeller, Dec 18 2015

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

A126257 Number of distinct new terms in row n of Pascal's triangle.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 5, 7, 8, 9, 9, 9, 8, 11, 11, 12, 12, 13, 13, 13, 14, 15, 15, 16, 16, 17, 16, 17, 18, 19, 19, 20, 20, 21, 21, 22, 21, 23, 23, 24, 24, 25, 25, 26, 26, 27, 26, 26, 28, 29, 29, 30, 30, 31, 31, 32, 32, 32, 33, 34, 34, 34, 35, 36, 36, 37, 37, 38
Offset: 0

Views

Author

Nick Hobson, Dec 24 2006

Keywords

Comments

Partial sums are in A126256.
n occurs a(n) times in A265912. - Reinhard Zumkeller, Dec 18 2015

Examples

			Row 6 of Pascal's triangle is: 1, 6, 15, 20, 15, 6, 1. Of these terms, only 15 and 20 do not appear in rows 0-5. Hence a(6)=2.
		

Crossrefs

Programs

  • Haskell
    import Data.List.Ordered (minus, union)
    a126257 n = a126257_list !! n
    a126257_list = f [] a034868_tabf where
       f zs (xs:xss) = (length ys) : f (ys `union` zs) xss
                       where ys = xs `minus` zs
    -- Reinhard Zumkeller, Dec 18 2015
    
  • PARI
    lim=77; z=listcreate(1+lim^2\4); print1(1, ", "); r=1; for(a=1, lim, for(b=1, a\2, s=Str(binomial(a, b)); f=setsearch(z, s, 1); if(f, listinsert(z, s, f))); print1(1+#z-r, ", "); r=1+#z)
    
  • Python
    def A126257(n):
        if n:
            s, c = (1,), {1}
            for i in range(n-1):
                c.update(set(s:=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1))+(1,)))
            return len(set((1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1))+(1,))-c)
        return 1 # Chai Wah Wu, Oct 17 2023

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

A014462 Triangular array formed from elements to left of middle of Pascal's triangle.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Coefficients for Pontryagin classes of projective spaces. See p. 3 of the Wilson link. Aerated to become a lower triangular matrix with alternating zeros on the diagonal, this matrix appparently becomes the reverse, or mirror, of A117178. - Tom Copeland, May 30 2017

Examples

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

Crossrefs

Cf. A014413, A034868, A058622 (row sums).
Cf. A001791 (a half-diagonal and diagonal sums).
Cf. A117178.

Programs

  • Haskell
    a014462 n k = a014462_tabf !! (n-1) !! (k-1)
    a014462_row n = a014462_tabf !! (n-1)
    a014462_tabf = map reverse a014413_tabf
    -- Reinhard Zumkeller, Dec 24 2015

Extensions

More terms from James Sellers

A062730 Rows of Pascal's triangle which contain 3 terms in arithmetic progression.

Original entry on oeis.org

7, 12, 14, 19, 21, 23, 32, 34, 45, 47, 60, 62, 77, 79, 96, 98, 117, 119, 140, 142, 165, 167, 192, 194, 221, 223, 252, 254, 285, 287, 320, 322, 357, 359, 396, 398, 437, 439, 480, 482, 525, 527, 572, 574, 621, 623, 672, 674, 725, 727, 780, 782, 837, 839
Offset: 1

Views

Author

Erich Friedman, Jul 11 2001

Keywords

Comments

Except for n=19, all n < 1000 have the form k^2-2 or k^2-4. When n=k^2-2, the three terms in AP are consecutive binomial coefficients C(n,k(k-1)/2-2), C(n,k(k-1)/2-1), and C(n,k(k-1)/2). When n=k^2-4, the three terms in AP differ by two: C(n,k(k-1)/2-4), C(n,k(k-1)/2-2), and C(n,k(k-1)/2). When n=19, the three terms in AP are C(19,4), C(19,6), and C(19,7). [From T. D. Noe, Mar 23 2009]

Examples

			12 is in the list since the 12th row of Pascal's triangle starts 1 12 (66) 220 (495) 792 (924) and 66 495 924 are in arithmetic progression.
		

Crossrefs

Programs

  • Haskell
    -- import Data.List (intersect)
    a062730 n = a062730_list !! (n-1)
    a062730_list =  filter f $ [3..] where
       f x = not $ all null $ zipWith
             (\us (v:vs) -> map (v -) us `intersect` map (subtract v) vs)
             (tail $ init $ inits bns) (tail $ init $ tails bns)
             where bns = a034868_row x
    -- Reinhard Zumkeller, Jun 10 2013
  • Mathematica
    kmax = 30; row[n_] := Table[Binomial[n, k], {k, 0, Floor[n/2]}]; Reap[Do[r = row[n]; If[ (r /. {_, a_, _, b_, _, c_, _} /; b - a == c - b -> {}) == {}, Print[n]; Sow[n]], {n, Union[{19}, Range[2, kmax]^2 - 2, Range[2, kmax]^2 - 4]}]][[2, 1]] (* Jean-François Alcover, Jul 11 2012, after T. D. Noe *)

Formula

G.f.: (-5x^8+3x^7+7x^6-3x^5+5x^4-5x^3-12x^2+5x+7)/[(1-x)(1-x^2)^2] (conjectured). - Ralf Stephan, May 08 2004
a(n)=(n^2+8*n+8)/4 for n>4 and even; a(n)=(n^2+10*n+9)/4 for n>4 and odd (conjectured). - Colin Barker, Aug 29 2013

Extensions

More terms from Naohiro Nomoto, Oct 01 2001
Offset corrected by Reinhard Zumkeller, Jun 10 2013
Showing 1-10 of 15 results. Next