login
Riordan array (1/(1-2*x), x*(1-x)/(1-2*x)).
7

%I #62 Sep 08 2022 08:45:17

%S 1,2,1,4,3,1,8,8,4,1,16,20,13,5,1,32,48,38,19,6,1,64,112,104,63,26,7,

%T 1,128,256,272,192,96,34,8,1,256,576,688,552,321,138,43,9,1,512,1280,

%U 1696,1520,1002,501,190,53,10,1,1024,2816,4096,4048,2972,1683,743,253,64,11

%N Riordan array (1/(1-2*x), x*(1-x)/(1-2*x)).

%C Extract antidiagonals from the product P * A, where P = the infinite lower triangular Pascal's triangle matrix; and A = the Pascal's triangle array:

%C 1, 1, 1, 1, ...

%C 1, 2, 3, 4, ...

%C 1, 3, 6, 10, ...

%C 1, 4, 10, 20, ...

%C ...

%C Row sums are Fibonacci(2n+2). Diagonal sums are A006054(n+2). Row sums of inverse are A105523. Product of Pascal triangle A007318 and A046854.

%C A106195 with an appended column of ones = A055587. Alternatively, k-th column (k=0, 1, 2) is the binomial transform of bin(n, k).

%C T(n,k) is the number of ideals in the fence Z(2n) having k elements of rank 1. - _Emanuele Munarini_, Mar 22 2011

%C Subtriangle of the triangle given by (0, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - _Philippe Deléham_, Mar 22 2012

%H Reinhard Zumkeller, <a href="/A106195/b106195.txt">Rows n = 0..125 of triangle, flattened</a>

%H E. Munarini, N. Zagaglia Salvi, <a href="http://dx.doi.org/10.1016/S0012-365X(02)00378-3">On the Rank Polynomial of the Lattice of Order Ideals of Fences and Crowns</a>, Discrete Mathematics 259 (2002), 163-177.

%F T(n,k) = Sum_{j=0..n} C(n-k,n-j)*C(j,k).

%F From _Emanuele Munarini_, Mar 22 2011: (Start)

%F T(n,k) = Sum_{i=0..n-k} C(k,i)*C(n-k,i)*2^(n-k-i).

%F T(n,k) = Sum_{i=0..n-k} C(k,i)*C(n-i,k)*(-1)^i*2^(n-k-i).

%F Recurrence: T(n+2,k+1) = 2*T(n+1,k+1)+T(n+1,k)-T(n,k) (End)

%F From _Clark Kimberling_, Feb 19 2012: Define

%F u(n,x) = u(n-1,x)+v(n-1,x), v(n,x) = u(n-1,x)+(x+1)v(n-1,x),

%F where u(1,x)=1, v(1,x)=1. Then v matches A106195 and u matches A207605. (End)

%F T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k-1). - _Philippe Deléham_, Mar 22 2012

%F T(n+k,k) is the coefficient of x^n y^k in 1/(1-2x-y+xy). - _Ira M. Gessel_, Oct 30 2012

%F T(n, k) = A208341(n+1,n-k+1), k = 0..n. - _Reinhard Zumkeller_, Dec 16 2013

%F T(n, k) = hypergeometric_2F1(-n+k, k+1, 1 , -1). - _Peter Luschny_, May 20 2015

%F G.f. 1/(1-2*x+x^2*y-x*y). - _R. J. Mathar_, Aug 11 2015

%F Sum_{k=0..n} T(n, k) = Fibonacci(2*n+2) = A088305(n+1). - _G. C. Greubel_, Mar 15 2020

%e Triangle begins

%e 1;

%e 2, 1;

%e 4, 3, 1;

%e 8, 8, 4, 1;

%e 16, 20, 13, 5, 1;

%e 32, 48, 38, 19, 6, 1;

%e 64, 112, 104, 63, 26, 7, 1;

%e (0, 2, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, ...) begins :

%e 1;

%e 0, 1;

%e 0, 2, 1;

%e 0, 4, 3, 1;

%e 0, 8, 8, 4, 1;

%e 0, 16, 20, 13, 5, 1;

%e 0, 32, 48, 38, 19, 6, 1;

%e 0, 64, 112, 104, 63, 26, 7, 1. - _Philippe Deléham_, Mar 22 2012

%p T := (n, k) -> hypergeom([-n+k, k+1],[1],-1):

%p seq(lprint(seq(simplify(T(n, k)), k=0..n)), n=0..7); # _Peter Luschny_, May 20 2015

%t u[1, x_] := 1; v[1, x_] := 1; z = 16;

%t u[n_, x_] := u[n - 1, x] + v[n - 1, x]

%t v[n_, x_] := u[n - 1, x] + (x + 1) v[n - 1, x]

%t Table[Factor[u[n, x]], {n, 1, z}]

%t Table[Factor[v[n, x]], {n, 1, z}]

%t cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];

%t TableForm[cu]

%t Flatten[%] (* A207605 *)

%t Table[Expand[v[n, x]], {n, 1, z}]

%t cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];

%t TableForm[cv]

%t Flatten[%] (* A106195 *)

%t (* _Clark Kimberling_, Feb 19 2012 *)

%t Table[Hypergeometric2F1[-n+k, k+1, 1, -1], {n, 0, 12}, {k, 0, n}]//Flatten (* _G. C. Greubel_, Mar 15 2020 *)

%o (Maxima) create_list(sum(binomial(i,k)*binomial(n-k,n-i),i,0,n),n,0,8,k,0,n); [Emanuele Munarini, Mar 22 2011]

%o (Haskell)

%o a106195 n k = a106195_tabl !! n !! k

%o a106195_row n = a106195_tabl !! n

%o a106195_tabl = [1] : [2, 1] : f [1] [2, 1] where

%o f us vs = ws : f vs ws where

%o ws = zipWith (-) (zipWith (+) ([0] ++ vs) (map (* 2) vs ++ [0]))

%o ([0] ++ us ++ [0])

%o -- _Reinhard Zumkeller_, Dec 16 2013

%o (Python)

%o from sympy import Poly, symbols

%o x = symbols('x')

%o def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)

%o def v(n, x): return 1 if n==1 else u(n - 1, x) + (x + 1)*v(n - 1, x)

%o def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]

%o for n in range(1, 13): print(a(n)) # _Indranil Ghosh_, May 28 2017

%o (Python)

%o from mpmath import hyp2f1, nprint

%o def T(n, k): return hyp2f1(k - n, k + 1, 1, -1)

%o for n in range(13): nprint([int(T(n, k)) for k in range(n + 1)]) # _Indranil Ghosh_, May 28 2017, after formula from _Peter Luschny_

%o (Magma) [ (&+[Binomial(n-k, n-j)*Binomial(j, k): j in [0..n]]): k in [0..n], n in [0..10]]; // _G. C. Greubel_, Mar 15 2020

%o (Sage) [[sum(binomial(n-k,n-j)*binomial(j,k) for j in (0..n)) for k in (0..n)] for n in (0..10)] # _G. C. Greubel_, Mar 15 2020

%Y Column 0 = 1, 2, 4...; (binomial transform of 1, 1, 1...); column 1 = 1, 3, 8, 20...(binomial transform of 1, 2, 3...); column 2: 1, 4, 13, 38...= binomial transform of bin(n, 2): 1, 3, 6...

%Y Cf. A001792, A001906, A002620, A007318, A029653, A049612, A055587, A078812, A208341.

%K easy,nonn,tabl

%O 0,2

%A _Gary W. Adamson_, Apr 24 2005; _Paul Barry_, May 21 2006

%E Edited by _N. J. A. Sloane_, Apr 09 2007, merging two sequences submitted independently by _Gary W. Adamson_ and _Paul Barry_