%I
%S 1,4,1,15,30,1,40,324,120,1,85,2080,3120,340,1,156,9375,40000,18750,
%T 780,1,259,32886,328125,437500,82215,1554,1,400,96040,1959216,6002500,
%U 3265360,288120,2800,1
%N Triangle by rows T(n,k), showing the number of meanders with length (n+1)*4 and containing (k+1)*4 Ls and (nk)*4 Rs, where Ls and Rs denote arcs of equal length and a central angle of 90 degrees which are positively or negatively oriented.
%C Definition of a meander:
%C A binary curve C is a triple (m, S, dir) such that
%C (a) S is a list with values in {L,R} which starts with an L,
%C (b) dir is a list of m different values, each value of S being allocated a value of dir,
%C (c) consecutive Ls increment the index of dir,
%C (d) consecutive Rs decrement the index of dir,
%C (e) the integer m > 0 divides the length of S and
%C (f) C is a meander if each value of dir occurs length(S)/m times.
%C For this sequence, m = 4.
%C The values in the triangle are proved by brute force for 0 <= n <= 8. The formulas are not yet proved in general.
%C The number triangle can be calculated recursively by the number triangles A007318, A103371 and A194595. The first column of the triangle seems to be A053698. The diagonal right hand is A000012. The diagonal with k = n1 seems to be A027445. Row sums are in A198256.
%C The conjectured formulas are confirmed by dynamic programming for 0 <= n <= 43.  _Susanne Wienand_, Jun 29 2015
%H Susanne Wienand, <a href="/A197653/b197653.txt">Table of n, a(n) for n = 0..989</a>
%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/Meander">Meanders and walks on the circle</a>.
%F Recursive formula (conjectured):
%F T(n,k) = T(4,n,k)
%F T(4,n,k) = T(1,n,k)^4 + T(1,n,k)*T(3,n,n1k), 0 <= k < n
%F T(4,n,n) = 1 k = n
%F T(3,n,k) = T(1,n,k)^3 + T(1,n,k)*T(2,n,n1k), 0 <= k < n
%F T(3,n,n) = 1 k = n
%F T(2,n,k) = T(1,n,k)^2 + T(1,n,k)*T(1,n,n1k), 0 <= k < n
%F T(2,n,n) = 1 k = n
%F T(3,n,k) = A194595
%F T(2,n,k) = A103371
%F T(1,n,k) = A007318 (Pascal's Triangle)
%F closed formula (conjectured): T(n,n) = 1, k = n
%F T(n,k) = A + B + C + D, k < n
%F A = (C(n,k))^4
%F B = (C(n,k))^3 * C(n,n1k)
%F C = (C(n,k))^2 *(C(n,n1k))^2
%F D = C(n,k) *(C(n,n1k))^3
%F [_Susanne Wienand_]
%F Let S(n,k) = binomial(2*n,n)^(k+1)*((n+1)^(k+1)n^(k+1))/(n+1)^k. Then T(2*n,n) = S(n,3).  _Peter Luschny_, Oct 20 2011
%F T(n,k) = A198063(n+1,k+1)*C(n,k)^4/(k+1)^3.  _Peter Luschny_, Oct 29 2011
%F T(n,k) = h(n,k)*binomial(n,k)^4, where h(n,k) = (1+k)*(1((nk)/(1+k))^4)/(1+2*kn) if 1+2*kn <> 0, otherwise h(n,k) = 4.  _Peter Luschny_, Nov 24 2011
%e For n = 4 and k = 2, T(4,4,2) = 3120.
%e Recursive example:
%e T(1,4,0) = 1,
%e T(1,4,1) = 4,
%e T(1,4,2) = 6,
%e T(1,4,3) = 4,
%e T(1,4,4) = 1,
%e T(3,4,0) = 21,
%e T(3,4,1) = 304,
%e T(3,4,2) = 456,
%e T(3,4,3) = 84,
%e T(3,4,1) = 1,
%e T(4,4,2) = 6^4 + 6*304 = 3120.
%e Example for closed formula:
%e T(4,2) = 6^4 + 6^3 * 4 + 6^2 * 4^2 + 6 * 4^3 = 3120.
%e Some examples of list S and allocated values of dir if n = 4 and k = 2:
%e Length(S) = (4+1)*4 = 20 and S contains (2+1)*4 = 12 Ls.
%e S: L,L,L,L,L,L,L,L,L,L,L,L,R,R,R,R,R,R,R,R
%e dir: 1,2,3,0,1,2,3,0,1,2,3,0,0,3,2,1,0,3,2,1
%e S: L,L,L,R,L,L,R,L,L,R,R,L,L,L,R,L,L,R,R,R
%e dir: 1,2,3,3,3,0,0,0,1,1,0,0,1,2,2,2,3,3,2,1
%e S: L,R,L,L,L,L,R,R,R,L,L,R,R,L,L,L,R,L,L,R
%e dir: 1,1,1,2,3,0,0,3,2,2,3,3,2,2,3,0,0,0,1,1
%e Each value of dir occurs 20/4 = 5 times.
%p A197653 := (n,k) > binomial(n,k)^4*(n+1)*(n^22*n*k+1+2*k+2*k^2)/((1+k)^3);
%p seq(print(seq(A197653(n, k), k=0..n)), n=0..7); # _Peter Luschny_, Oct 19 2011
%t T[n_, k_] := Binomial[n, k]^4 (n+1)(n^2  2n*k + 1 + 2k + 2k^2)/((1+k)^3);
%t Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* _JeanFrançois Alcover_, Jul 30 2018, after _Peter Luschny_ *)
%o (C#) static int[] A197653_row(int r) { return GenBinomial(r, 4); } // The function GenBinomial(r,s) is defined in A194595.
%o // This C# program causes numerical overflow for results larger than 2147483647.  _Susanne Wienand_, Jun 29 2015
%o (Sage)
%o def S(N,n,k) : return binomial(n,k)^(N+1)*sum(sum((1)^(Nj+i)*binomial(Ni,j)*((n+1)/(k+1))^j for i in (0..N) for j in (0..N)))
%o def A197653(n,k) : return S(3,n,k)
%o for n in (0..5) : print [A197653(n,k) for k in (0..n)] ## _Peter Luschny_, Oct 24 2011
%o (PARI)
%o A197653(n,k) = {if(n==1+2*k,4,(1+k)*(1((nk)/(1+k))^4)/(1+2*kn))*binomial(n,k)^4} \\ _Peter Luschny_, Nov 24 2011
%Y Cf. A000012, A007318, A027445, A053698, A103371, A194595, A197654, A197655, A198063, A198256.
%K nonn,tabl
%O 0,2
%A _Susanne Wienand_, Oct 17 2011
