login
Triangle by rows T(n,k), showing the number of meanders with length 5(n+1) and containing 5(k+1) L's and 5(n-k) R's, where L's and R's denote arcs of equal length and a central angle of 72 degrees which are positively or negatively oriented.
8

%I #96 Mar 07 2020 06:47:19

%S 1,5,1,31,62,1,121,1215,363,1,341,13504,20256,1364,1,781,96875,500000,

%T 193750,3905,1,1555,501066,7321875,9762500,1252665,9330,1,2801,

%U 2033647,72656661,262609375,121094435,6100941,19607,1

%N Triangle by rows T(n,k), showing the number of meanders with length 5(n+1) and containing 5(k+1) L's and 5(n-k) R's, where L's and R's denote arcs of equal length and a central angle of 72 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 L's increment the index of dir,

%C (d) consecutive R's decrement the index of dir,

%C (e) the integer m>0 divides the length of S.

%C Then C is a meander if each value of dir occurs length(S)/m times.

%C Let T(m,n,k) = number of meanders (m, S, dir) in which S contains m(k+1) L's and m(n-k) R's, so that length(S) = m(n+1).

%C For this sequence, m = 5, T(n,k) = T(5,n,k).

%C The values in the triangle were proved by brute force for 0 <= n <= 6. The formulas have not yet been proved in general.

%C The number triangle can be calculated recursively by the number triangles and A007318, A103371, A194595 and A197653. The first column seems to be A053699. The diagonal right hand is A000012. The diagonal with k = n-1 seems to be A152031 and to start with the second number of A152031. Row sums are in A198257.

%C The conjectured formulas are confirmed by dynamic programming for 0 <= n <= 29. - _Susanne Wienand_, Jul 01 2015

%H Alois P. Heinz, <a href="/A197654/b197654.txt">Rows n = 0..140, flattened</a>

%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/Meander">Meanders and walks on the circle</a>.

%H Susanne Wienand, <a href="https://oeis.org/wiki/User:Susanne_Wienand#Example_of_a_meander_counted_by_A197654">Example of a meander counted by A197654</a>

%F Recursive formula (conjectured):

%F T(n,k) = T(5,n,k) = T(1,n,k)^5 + T(1,n,k)*T(4,n,n-1-k), 0 <= k < n

%F T(5,n,n) = 1 k = n

%F T(4,n,k) = T(1,n,k)^4 + T(1,n,k) * T(3,n,n-1-k), 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,n-1-k), 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,n-1-k), 0<= k < n

%F T(2,n,n) = 1 k = n

%F T(4,n,k) = A197653

%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 + E, k < n

%F A = (C(n,k))^5

%F B = (C(n,k))^4 * C(n,n-1-k)

%F C = (C(n,k))^3 *(C(n,n-1-k))^2

%F D = (C(n,k))^2 *(C(n,n-1-k))^3

%F E = C(n,k) *(C(n,n-1-k))^4 [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,4). [_Peter Luschny_, Oct 20 2011]

%F T(n,k) = A198064(n+1,k+1)C(n,k)^5/(k+1)^4. [_Peter Luschny_, Oct 29 2011]

%F T(n,k) = h(n,k)*binomial(n,k)^5, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^5)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 5. [_Peter Luschny_, Nov 24 2011]

%e For n = 5 and k = 2, T(n,k) = 500000

%e Example for recursive formula:

%e T(1,5,2) = 10

%e T(4,5,5-1-2) = T(4,5,2) = 40000

%e T(5,5,2) = 10^5 + 10*40000 = 500000

%e Example for closed formula:

%e T(5,2) = A + B + C + D + E

%e A = 10^5

%e B = 10^4 * 10

%e C = 10^3 * 10^2

%e D = 10^2 * 10^3

%e E = 10 * 10^4

%e T(5,2) = 5 * 10^5 = 500000

%e Some examples of list S and allocated values of dir if n = 5 and k = 2:

%e Length(S) = (5+1)*5 = 30 and S contains (2+1)*5 = 15 Ls.

%e S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,R,R,R,R,R,R,R,R,R,R,R,R,R,R,R

%e dir: 1,2,3,4,0,1,2,3,4,0,1,2,3,4,0,0,4,3,2,1,0,4,3,2,1,0,4,3,2,1

%e S: L,L,L,L,L,L,L,R,R,L,L,R,R,R,L,R,R,R,L,R,L,L,L,R,R,L,R,R,R,R

%e dir: 1,2,3,4,0,1,2,2,1,1,2,2,1,0,0,0,4,3,3,3,3,4,0,0,4,4,4,3,2,1

%e S: L,L,L,L,L,R,L,L,L,L,L,R,L,R,R,R,R,R,R,R,R,R,R,L,L,L,L,R,R,R

%e dir: 1,2,3,4,0,0,0,1,2,3,4,4,4,4,3,2,1,0,4,3,2,1,0,0,1,2,3,3,2,1

%e Each value of dir occurs 30/5 = 6 times.

%e The triangle begins:

%e 1,

%e 5, 1,

%e 31, 62, 1,

%e 121, 1215, 363, 1,

%e 341, 13504, 20256, 1364, 1,

%e 781, 96875, 500000, 193750, 3905, 1,

%e ...

%p A197654 := (n,k)->(k^4+2*k^3*(1-n)+2*k^2*(2+n+2*n^2)+k*(3+n-n^2-3*n^3)+ n^4+n^3+n^2+n+1)*binomial(n,k)^5/(1+k)^4;

%p seq(print(seq(A197654(n, k), k=0..n)), n=0..7); # _Peter Luschny_, Oct 20 2011

%t T[n_, k_] := (k^4 + 2*k^3*(1-n) + 2*k^2*(2+n+2*n^2) + k*(3+n-n^2-3*n^3) + n^4+n^3+n^2+n+1)*Binomial[n, k]^5/(1+k)^4; Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Feb 20 2017, after _Peter Luschny_ *)

%o (C#) static int[] A197654_row(int r) { return GenBinomial(r, 5); } // The function GenBinomial(r, s) is defined in A194595.

%o // This C#-program causes numerical overflow for results larger than 2147483647. - _Susanne Wienand_, Jul 01 2015

%o (Sage)

%o def S(N,n,k) : return binomial(n,k)^(N+1)*sum(sum((-1)^(N-j+i)*binomial(N-i,j)*((n+1)/(k+1))^j for i in (0..N) for j in (0..N)))

%o def A197654(n,k) : return S(4,n,k)

%o for n in (0..5) : print([A197654(n,k) for k in (0..n)]) # Peter Luschny, Oct 24 2011

%o (PARI) A197654(n,k) = {if(n ==1+2*k,5,(1+k)*(1-((n-k)/(1+k))^5)/(1+2*k-n))*binomial(n,k)^5} \\ _Peter Luschny_, Nov 24 2011

%Y Cf. A000012, A007318, A053699, A103371, A152031, A194595, A197653, A197655, A198257.

%K nonn,tabl

%O 0,2

%A _Susanne Wienand_, Oct 19 2011