A237520 Irregular triangular array read by rows: T(n,k) is the number of n-step walks (steps +1,-1) on the x-axis beginning at the origin that are on the origin for the last time on step 2k, n>=0, 0<=k<=floor(n/2).
1, 2, 2, 2, 4, 4, 6, 4, 6, 12, 8, 12, 20, 12, 12, 20, 40, 24, 24, 40, 70, 40, 36, 40, 70, 140, 80, 72, 80, 140, 252, 140, 120, 120, 140, 252, 504, 280, 240, 240, 280, 504, 924, 504, 420, 400, 420, 504, 924, 1848, 1008, 840, 800, 840, 1008, 1848, 3432, 1848, 1512, 1400, 1400, 1512, 1848
Offset: 0
Examples
1; 2; 2, 2; 4, 4; 6, 4, 6; 12, 8, 12; 20, 12, 12, 20; 40, 24, 24, 40; 70, 40, 36, 40, 70; 140, 80, 72, 80, 140; 252, 140, 120, 120, 140, 252; T(4,1) = 4 because we have: (-1,+1,-1,-1), (-1,+1,+1,+1), (+1,-1,-1,-1), (+1,-1,+1,+1). These walks have 4 steps and are on the origin for the last time on step 2*1=2.
Links
- Alois P. Heinz, Rows n = 0..200, flattened
Crossrefs
Cf. A067804.
Programs
-
Maple
T:= (n, k)-> 2^irem(n, 2)*binomial(2*k, k)* binomial(2*iquo(n, 2)-2*k, iquo(n, 2)-k): seq(seq(T(n, k), k=0..iquo(n, 2)), n=0..14); # Alois P. Heinz, May 10 2014
-
Mathematica
nn=20;d=(1-(1-4x^2)^(1/2))/(2x^2);Map[Select[#,#>0&]&,Transpose[Table[ CoefficientList[Series[Binomial[2n,n]x^(2n)(1-2x^2d)/(1-2x),{x,0,nn}],x],{n,0,nn/2}]]]//Grid (* or *) f[list_]:=If[Max[Flatten[Position[list,0]]]== -Infinity,0,Max[Flatten[ Position[list,0]]]]; Table[Distribution[Map[f,Map[Accumulate, Strings[{-1,1},n]]]],{n,0,10}]//Grid
Formula
G.f. for column k: binomial(2k,k) x^k*A(x) where A(x) is the o.g.f. for A063886.
Comments