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.

A029653 Numbers in (2,1)-Pascal triangle (by row).

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 2, 5, 4, 1, 2, 7, 9, 5, 1, 2, 9, 16, 14, 6, 1, 2, 11, 25, 30, 20, 7, 1, 2, 13, 36, 55, 50, 27, 8, 1, 2, 15, 49, 91, 105, 77, 35, 9, 1, 2, 17, 64, 140, 196, 182, 112, 44, 10, 1, 2, 19, 81, 204, 336, 378, 294, 156, 54, 11, 1, 2, 21, 100, 285
Offset: 0

Views

Author

Keywords

Comments

Reverse of A029635. Row sums are A003945. Diagonal sums are Fibonacci(n+2) = Sum_{k=0..floor(n/2)} (2n-3k)*C(n-k,n-2k)/(n-k). - Paul Barry, Jan 30 2005
Riordan array ((1+x)/(1-x), x/(1-x)). The signed triangle (-1)^(n-k)T(n,k) or ((1-x)/(1+x), x/(1+x)) is the inverse of A055248. Row sums are A003945. Diagonal sums are F(n+2). - Paul Barry, Feb 03 2005
Row sums = A003945: (1, 3, 6, 12, 24, 48, 96, ...) = (1, 3, 7, 15, 31, 63, 127, ...) - (0, 0, 1, 3, 7, 15, 31, ...); where (1, 3, 7, 15, ...) = A000225. - Gary W. Adamson, Apr 22 2007
Triangle T(n,k), read by rows, given by (2,-1,0,0,0,0,0,0,0,...) DELTA (1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 17 2011
A029653 is jointly generated with A208510 as an array of coefficients of polynomials v(n,x): initially, u(1,x)=v(1,x)=1; for n>1, u(n,x)=u(n-1,x)+x*v(n-1)x and v(n,x)=u(n-1,x)+x*v(n-1,x)+1. See the Mathematica section. - Clark Kimberling, Feb 28 2012
For a closed-form formula for arbitrary left and right borders of Pascal like triangle, see A228196. - Boris Putievskiy, Aug 18 2013
For a closed-form formula for generalized Pascal's triangle, see A228576. - Boris Putievskiy, Sep 04 2013
The n-th row polynomial is (2 + x)*(1 + x)^(n-1) for n >= 1. More generally, the n-th row polynomial of the Riordan array ( (1-a*x)/(1-b*x), x/(1-b*x) ) is (b - a + x)*(b + x)^(n-1) for n >= 1. - Peter Bala, Feb 25 2018

Examples

			The triangle T(n,k) begins:
n\k 0  1  2   3   4   5   6   7  8  9 10 ...
0:  1
1:  2  1
2:  2  3  1
3:  2  5  4   1
4:  2  7  9   5   1
5:  2  9 16  14   6   1
6:  2 11 25  30  20   7   1
7:  2 13 36  55  50  27   8   1
8:  2 15 49  91 105  77  35   9  1
9:  2 17 64 140 196 182 112  44 10  1
10: 2 19 81 204 336 378 294 156 54 11  1
... Reformatted. - _Wolfdieter Lang_, Jan 09 2015
With the array M(k) as defined in the Formula section, the infinite product M(0)*M(1)*M(2)*... begins
/1        \/1         \/1        \      /1        \
|2 1      ||0 1       ||0 1      |      |2 1      |
|2 1 1    ||0 2 1     ||0 0 1    |... = |2 3 1    |
|2 1 1 1  ||0 2 1 1   ||0 0 2 1  |      |2 5 4 1  |
|2 1 1 1 1||0 2 1 1 1 ||0 0 2 1 1|      |2 7 9 5 1|
|...      ||...       ||...      |      |...      |
- _Peter Bala_, Dec 27 2014
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.

Crossrefs

(d, 1) Pascal triangles: A007318(d=1), A093560(3), A093561(4), A093562(5), A093563(6), A093564(7), A093565(8), A093644(9), A093645(10).

Programs

  • Haskell
    a029653 n k = a029653_tabl !! n !! k
    a029653_row n = a029653_tabl !! n
    a029653_tabl = [1] : iterate
                   (\xs -> zipWith (+) ([0] ++ xs) (xs ++ [0])) [2, 1]
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Maple
    A029653 :=  proc(n,k)
    if n = 0 then
      1;
    else
      binomial(n-1, k)+binomial(n, k)
    fi
    end proc: # R. J. Mathar, Jun 30 2013
  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + x*v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + x*v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A208510 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A029653 *)
    (* Clark Kimberling, Feb 28 2012 *)
  • Python
    from sympy import Poly
    from sympy.abc import x
    def u(n, x): return 1 if n==1 else u(n - 1, x) + x*v(n - 1, x)
    def v(n, x): return 1 if n==1 else u(n - 1, x) + x*v(n - 1, x) + 1
    def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 27 2017
    
  • Python
    from math import comb, isqrt
    def A029653(n): return comb(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),a:=n-comb(r+1,2))*((r<<1)-a)//r if n else 1 # Chai Wah Wu, Nov 12 2024

Formula

T(n, k) = C(n-2, k-1) + C(n-2, k) + C(n-1, k-1) + C(n-1, k) except for n=0.
G.f.: (1 + x + y + xy)/(1 - y - xy). - Ralf Stephan, May 17 2004
T(n, k) = (2n-k)*binomial(n, n-k)/n, n, k > 0. - Paul Barry, Jan 30 2005
Sum_{k=0..n} T(n, k)*x^k gives A003945-A003954 for x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. - Philippe Deléham, Jul 10 2005
T(n, k) = C(n-1, k) + C(n, k). - Philippe Deléham, Jul 10 2005
Equals A097806 * A007318, i.e., the pairwise operator * Pascal's Triangle as infinite lower triangular matrices. - Gary W. Adamson, Apr 22 2007
From Peter Bala, Dec 27 2014: (Start)
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(2 + 5*x + 4*x^2/2! + x^3/3!) = 2 + 7*x + 16*x^2/2! + 30*x^3/3! + 50*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ).
Let M denote the lower unit triangular array with 1's on the main diagonal and 1's everywhere else below the main diagonal except for the first column which consists of the sequence [1,2,2,2,...]. For k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section. (End)

Extensions

More terms from James Sellers