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.

Showing 1-5 of 5 results.

A198060 Array read by antidiagonals, m>=0, n>=0, A(m,n) = Sum_{k=0..n} Sum_{j=0..m} Sum_{i=0..m} (-1)^(j+i)*C(i,j)*C(n,k)^(m+1)*(n+1)^j*(k+1)^(-j).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 1, 4, 10, 8, 1, 5, 22, 35, 16, 1, 6, 46, 134, 126, 32, 1, 7, 94, 485, 866, 462, 64, 1, 8, 190, 1700, 5626, 5812, 1716, 128, 1, 9, 382, 5831, 35466, 69062, 40048, 6435, 256, 1, 10, 766, 19682, 219626, 795312, 882540, 281374, 24310, 512
Offset: 0

Views

Author

Peter Luschny, Nov 01 2011

Keywords

Comments

We repeat the definition of a meander as given in the link below and used in the sequences in the cross-references:
A binary curve C is a triple (m, S, dir) such that:
(a) S is a list with values in {L, R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m > 0 divides the length of S.
(f) C is a meander if each value of dir occurs length(S) / m times.
The rows of the array A(m, n) show the number of meanders of length n and central angle 360/m as specified by the columns of a table in the given link. - Peter Luschny, Mar 20 2023

Examples

			Array A(m, k) starts:
  m\n  [0] [1]  [2]   [3]     [4]     [5]        [6]
  --------------------------------------------------
  [0]   1   2    4     8      16       32         64   A000079
  [1]   1   3   10    35     126      462       1716   A001700
  [2]   1   4   22   134     866     5812      40048   A197657
  [3]   1   5   46   485    5626    69062     882540   A198256
  [4]   1   6   94  1700   35466   795312   18848992   A198257
  [5]   1   7  190  5831  219626  8976562  394800204   A198258
Triangle T(m, k) starts:
  [0]   1;
  [1]   2,    1;
  [2]   4,    3,    1;
  [3]   8,   10,    4,    1;
  [4]  16,   35,   22,    5,    1;
  [5]  32,  126,  134,   46,    6,   1;
  [6]  64,  462,  866,  485,   94,   7, 1;
  [7] 128, 1716, 5812, 5626, 1700, 190, 8, 1;
Using the representation of meanders as multiset permutations (see A361043) and generated by the Julia program below.
  T(3, 0) =  8 = card(1000, 1100, 1010, 1001, 1110, 1101, 1011, 1111).
  T(3, 1) = 10 = card(110000, 100100, 100001, 111100, 111001, 110110, 110011, 101101, 100111, 111111).
  T(3, 2) =  4 = card(111000, 110001, 100011, 111111).
  T(3, 3) =  1 = card(1111).
		

Crossrefs

Programs

  • Julia
    using Combinatorics
    function isMeander(m::Int, c::Vector{Bool})::Bool
        l = length(c)
        (l == 0 || c[1] != true) && return false
        vec = fill(Int(0), m)
        max = div(l, m)
        dir = Int(1)
        ob = c[1]
        for b in c
            if b && ob
                dir += 1
            elseif !b && !ob
                dir -= 1
            end
            dir = mod(dir, m)
            v = vec[dir + 1] + 1
            vec[dir + 1] = v
            if v > max
                return false
            end
            ob = b
        end
    true end
    function CountMeanders(n, k)
        n == 0 && return k + 1
        count = 0
        size = n * k
        for a in range(0, stop=size; step=n)
            S = [(i <= a) for i in 1:size]
            count += sum(1 for c in multiset_permutations(S, size)
                         if isMeander(n, c); init = 0)
        end
    count end
    A198060ByCount(m, n) = CountMeanders(m + 1, n + 1)
    for n in 0:4
        [A198060ByCount(n, k) for k in 0:4] |> println
    end
    # Peter Luschny, Mar 20 2023
  • Maple
    A198060 := proc(m, n) local i, j, k; add(add(add((-1)^(j+i)*binomial(i, j)* binomial(n, k)^(m+1)*(n+1)^j*(k+1)^(-j), i=0..m), j=0..m), k=0..n) end:
    for m from 0 to 6 do seq(A198060(m, n), n=0..6) od;
  • Mathematica
    a[m_, n_] := Sum[ Sum[ Sum[(-1)^(j + i)*Binomial[i, j]*Binomial[n, k]^(m+1)*(n+1)^j*(k+1)^(m-j)/(k+1)^m, {i, 0, m}], {j, 0, m}], {k, 0, n}]; Table[ a[m-n, n], {m, 0, 9}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jun 27 2013 *)
  • SageMath
    # This function assumes an offset (1, 1).
    def A(m: int, n: int) -> int:
        S = sum(
                sum(
                    sum((
                        (-1) ** (j + i)
                        * binomial(i, j)
                        * binomial(n - 1, k) ** m
                        * n ** j )
                        // (k + 1) ** j
                    for i in range(m) )
                for j in range(m) )
            for k in range(n) )
        return S
    def Arow(n: int, size: int) -> list[int]:
        return [A(n, k) for k in range(1, size + 1)]
    for n in range(1, 7): print([n], Arow(n, 7)) # Peter Luschny, Mar 24 2023
    # These functions compute the number of meanders by generating and counting.
    # Their primary purpose is to illustrate that meanders are a special class of
    # multiset permutations. They are not suitable for numerical calculation.
    

Formula

From Peter Bala, Apr 22 2022: (Start)
Conjectures:
1) the m-th row entries satisfy the Gauss congruences T(m, n*p^r - 1) == T(m, n*p^(r-1) - 1) (mod p^r) for primes p >= 3 and positive integers n and r.
2) for m even, the m-th row entries satisfy the congruences T(m, p^r - 1) == 2^(p^r - 1) (mod p^2) for primes p >= 3 and positive integers r.
3) for m odd, the m-th row entries satisfy the supercongruences T(m,n*p^r - 1) == T(m,n*p*(r-1) - 1) (mod p^(3*r)) for primes p >= 5 and positive integers n and r. (End)

A198256 Row sums of A197653.

Original entry on oeis.org

1, 5, 46, 485, 5626, 69062, 882540, 11614437, 156343330, 2142556130, 29791689148, 419260001030, 5960334608788, 85469709312860, 1234797737654296, 17955907741675749, 262607675818816050, 3860239468267647914, 57002176852356800700, 845159480056345448610
Offset: 0

Views

Author

Susanne Wienand, Oct 22 2011

Keywords

Comments

Number of meanders of length (n+1)*4 which are composed by arcs of equal length and a central angle of 90 degrees.
Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m > 0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 4.
The terms are proved by brute force for 0 <= n <= 8, but not yet in general. - Susanne Wienand, Oct 29 2011

Examples

			Some examples of list S and allocated values of dir if n = 4:
Length(S) = (4+1)*4 = 20.
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L
dir: 1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0
  S: L,L,L,L,R,L,R,R,L,R,R,R,L,R,L,L,R,L,L,L
dir: 1,2,3,0,0,0,0,3,3,3,2,1,1,1,1,2,2,2,3,0
  S: L,L,R,L,L,L,L,R,R,L,R,R,L,R,L,L,L,L,R,R
dir: 1,2,2,2,3,0,1,1,0,0,0,3,3,3,3,0,1,2,2,1
Each value of dir occurs 20/4 = 5 times.
		

Crossrefs

Programs

  • Mathematica
    A198256[n_] := Sum[Sum[Sum[(-1)^(j + i)* Binomial[i, j]*Binomial[n, k]^4*(n + 1)^j*(k + 1)^(3 - j)/(k + 1)^3, {i, 0, 3}], {j, 0, 3}], {k, 0, n}]; Table[A198256[n], {n, 0, 16}] (* Peter Luschny, Nov 02 2011 *)
  • PARI
    A198256(n) = {sum(k=0,n,if(n == 1+2*k,4,(1+k)*(1-((n-k)/(1+k))^4)/(1+2*k-n))*binomial(n,k)^4)} \\ Peter Luschny, Nov 24 2011
  • Sage
    from mpmath import mp, hyper
    def A198256(n) : return hyper([1-n, 1-n, 1-n, 1-n], [3, 3, 3], 1)*(n^4-n^6)/4 + hyper([-n, -n, -n, -n], [2, 2, 2], 1)*(1+n+n^2+n^3) + hyper([2, 1-n, 1-n, 1-n, 1-n], [1, 3, 3, 3], 1)*(n^4+n^5)/4
    mp.dps = 32
    for n in (0..19) : print(int(A198256(n)))  # Peter Luschny, Oct 24 2011
    

Formula

a(n) = Sum_{k=0..n} Sum_{j=0..3} Sum_{i=0..3} (-1)^(j+i)*C(i,j)*C(n,k)^4*(n+1)^j*(k+1)^(3-j)/(k+1)^3. - Peter Luschny, Nov 02 2011
a(n) = Sum_{k=0..n} h(n,k)*binomial(n,k)^4, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^4)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 4. - Peter Luschny, Nov 24 2011
From Peter Bala, Mar 21 2023: (Start)
Conjecture 1: a(n) = Sum_{k = 0..n} binomial(n+1,k)^2*binomial(n,k)^2.
If true, then we have the third-order recurrence equation
n^2*(n + 1)^3*P(n-1)*a(n) = 2*n^2*(400*n^8 - 1260*n^7 + 20*n^6 + 3020*n^5 - 1646*n^4 - 1951*n^3 + 1142*n^2 + 465*n - 290)*a(n-1) + 4*(n - 1)*(2800*n^9 - 15420*n^8 + 30620*n^7 - 23710*n^6 + 808*n^5 + 6863*n^4 - 1309*n^3 - 1218*n^2 + 496*n - 60)*a(n-2) + 8*(n - 2)^2*(2*n - 3)*(4*n - 5)*(4*n - 7)*P(n)*a(n-3) with a(0) = 1, a(1) = 5 and a(2) = 46 and where P(n) = 100*n^5 - 65*n^4 - 35*n^3 + 25*n^2 + 6*n - 5.
Conjecture 2: working with offset 1, that is, a(1) = 1, a(2) = 5, ..., then the supercongruence a(n*p^r) == a(n*p^(r-1)) (mod p^(3*r)) holds for positive integers n and r and all primes p >= 5. (End)
a(n) ~ 2^(4*n + 5/2) / (Pi*n)^(3/2). - Vaclav Kotesovec, Apr 17 2023
Peter Bala's conjecture 1 can equivalently written: a(n) = hypergeom([-n - 1, -n - 1, -n, -n], [1, 1, 1], 1). - Detlef Meya, May 28 2024
a(n) = Sum_{k=0..n+1} (k/(n+1))^2 * binomial(n+1,k)^4. - Seiichi Manyama, Jul 14 2024

A197655 Triangle by rows T(n,k), showing the number of meanders with length (n+1)*6 and containing (k+1)*6 Ls and (n-k)*6 Rs, where Ls and Rs denote arcs of equal length and a central angle of 60 degrees which are positively or negatively oriented.

Original entry on oeis.org

1, 6, 1, 63, 126, 1, 364, 4374, 1092, 1, 1365, 85120, 127680, 5460, 1, 3906, 984375, 6000000, 1968750, 19530, 1, 9331, 7562646, 157828125, 210437500, 18906615, 55986, 1, 19608, 42824236, 2628749256, 11029593750, 4381248760, 128472708, 137256, 1
Offset: 0

Views

Author

Susanne Wienand, Oct 19 2011

Keywords

Comments

Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m>0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 6.
The values in the triangle are proved by brute force for 0 <= n <= 5. The formulas are not yet proved in general.
The number triangle can be calculated recursively by the number triangles and A007318, A103371, A194595, A197653 and A197654. For n > 0, the first column seems to be A053700. The diagonal right hand is A000012. Row sums are in A198258.
The conjectured formulas are confirmed by dynamic programming for 0 <= n <= 19. - Susanne Wienand, Jul 04 2015

Examples

			For n = 4 and k = 2, T(n,k) = 127680
Example for recursive formula:
T(1,4,2) = 6
T(5,4,4-1-2) = T(5,4,1) = 13504
T(6,4,2) = 6^6 + 6*13504 = 127680
Example for closed formula:
T(4,2) = A + B + C + D + E + F
A = 6^6       =  46656
B = 6^5 * 4   =  31104
C = 6^4 * 4^2 =  20736
D = 6^3 * 4^3 =  13824
E = 6^2 * 4^4 =   9216
F = 6   * 4^5 =   6144
T(4,2)        = 127680
Some examples of list S and allocated values of dir if n = 4 and k = 2:
Length(S) = (4+1)*6 = 30 and S contains (2+1)*6 = 18 Ls.
  S: L,L,L,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
dir: 1,2,3,4,5,0,1,2,3,4,5,0,1,2,3,4,5,0,0,5,4,3,2,1,0,5,4,3,2,1
  S: L,L,L,L,L,L,L,L,L,L,R,L,L,R,L,R,R,R,L,R,R,L,R,R,R,L,L,R,R,L
dir: 1,2,3,4,5,0,1,2,3,4,4,4,5,5,5,5,4,3,3,3,2,2,2,1,0,0,1,1,0,0
  S: L,L,L,L,R,L,L,R,L,L,R,L,R,R,L,L,L,L,L,R,R,L,L,L,R,R,R,R,L,R
dir: 1,2,3,4,4,4,5,5,5,0,0,0,0,5,5,0,1,2,3,3,2,2,3,4,4,3,2,1,1,1
Each value of dir occurs 30/6 = 5 times.
		

Crossrefs

Programs

  • Maple
    A197655 := (n,k) -> (1+n)*(1+3*k+3*k^2-n-3*k*n+n^2)*(1+k+k^2+n-k*n+n^2)* binomial(n,k)^6/(1+k)^5; seq(print(seq(A197655(n, k), k=0..n)), n=0..7); # Peter Luschny, Oct 21 2011
  • Mathematica
    T[n_, k_] := (1 + n)(1 + 3k + 3k^2 - n - 3k*n + n^2)(1 + k + k^2 + n - k*n + n^2) Binomial[n, k]^6/(1 + k)^5;
    Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 30 2018, after Peter Luschny *)
  • PARI
    A197655(n,k) = {if(n==1+2*k,6,(1+k)*(1-((n-k)/(1+k))^6)/(1+2*k-n))*binomial(n,k)^6} \\ Peter Luschny, Nov 24 2011
  • Sage
    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)))
    def A197655(n,k) : return S(5,n,k)
    for n in (0..5) : print([A197655(n,k) for k in (0..n)])  # Peter Luschny, Oct 24 2011
    

Formula

recursive formula (conjectured):
T(n,k) = T(6,n,k)
T(6,n,k) = T(1,n,k)^6 + T(1,n,k)*T(5,n,n-1-k), 0 <= k < n
T(6,n,n) = 1 k = n
T(5,n,k) = T(1,n,k)^5 + T(1,n,k)*T(4,n,n-1-k), 0 <= k < n
T(5,n,n) = 1 k = n
T(4,n,k) = T(1,n,k)^4 + T(1,n,k)*T(3,n,n-1-k), 0 <= k < n
T(4,n,n) = 1 k = n
T(3,n,k) = T(1,n,k)^3 + T(1,n,k)*T(2,n,n-1-k), 0 <= k < n
T(3,n,n) = 1 k = n
T(2,n,k) = T(1,n,k)^2 + T(1,n,k)*T(1,n,n-1-k), 0 <= k < n
T(2,n,n) = 1 k = n
T(5,n,k) = A197654
T(4,n,k) = A197653
T(3,n,k) = A194595
T(2,n,k) = A103371
T(1,n,k) = A007318 (Pascal's Triangle)
closed formula (conjectured): T(n,n) = 1, k = n
T(n,k) = A + B + C + D + E + F, k < n
A = (C(n,k))^6
B = (C(n,k))^5 * C(n,n-1-k)
C = (C(n,k))^4 *(C(n,n-1-k))^2
D = (C(n,k))^3 *(C(n,n-1-k))^3
E = (C(n,k))^2 *(C(n,n-1-k))^4
F = C(n,k) *(C(n,n-1-k))^5
[Susanne Wienand]
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,5). (Cf. A103371, A194595, A197653). [Peter Luschny, Oct 21 2011]
T(n,k) = A198065(n+1,k+1)C(n,k)^6/(k+1)^5. [Peter Luschny, Oct 29 2011]
T(n,k) = h(n,k)*binomial(n,k)^6, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^6)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 6. [Peter Luschny, Nov 24 2011]

A197657 Row sums of A194595.

Original entry on oeis.org

1, 4, 22, 134, 866, 5812, 40048, 281374, 2006698, 14482064, 105527060, 775113440, 5731756720, 42628923040, 318621793472, 2391808860446, 18023208400634, 136271601087352, 1033449449559724, 7858699302115444, 59906766929537116, 457685157123172664
Offset: 0

Views

Author

Susanne Wienand, Oct 17 2011

Keywords

Comments

Number of meanders of length (n+1)*3 which are composed by arcs of equal length and a central angle of 120 degrees.
Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m>0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 3.
For 0 <= n <= 16, a(n) = the hypergraph Fuss-Catalan number FC_1^(2,n+1) in the notation of Chavan et al. - see 7.1 in the Appendix. - Peter Bala, Apr 11 2023

Examples

			Some examples of list S and allocated values of dir if n = 4:
Length(S) = (4+1)*3 = 15.
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L
dir: 1,2,0,1,2,0,1,2,0,1,2,0,1,2,0
  S: L,L,L,L,R,L,L,R,L,L,R,L,L,L,L
dir: 1,2,0,1,1,1,2,2,2,0,0,0,1,2,0
  S: L,R,L,L,L,L,L,R,L,L,R,L,R,R,R
dir: 1,1,1,2,0,1,2,2,2,0,0,0,0,2,1
Each value of dir occurs 15/3 = 5 times.
		

Crossrefs

Programs

  • Maple
    A197657 := proc(n)
        (A000172(n) + A000172(n+1)) / 3 ;
    end proc; # R. J. Mathar, Jul 26 2014
    a := n -> 2^n*hypergeom([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1):
    seq(simplify(a(n)), n = 0..21); # Peter Luschny, Mar 26 2023
  • Mathematica
    A197657[n_] := Sum[Sum[Sum[(-1)^(j + i)* Binomial[i, j]*Binomial[n, k]^3*(n + 1)^j*(k + 1)^(2 - j)/(k + 1)^2, {i, 0, 2}], {j, 0, 2}], {k, 0, n}]; Table[A197657[n], {n, 0, 16}]  (* Peter Luschny, Nov 02 2011 *)
  • PARI
    A197657(n) = {sum(k=0,n,if(n == 1+2*k,3,(1+k)*(1-((n-k)/(1+k))^3)/(1+2*k-n))*binomial(n,k)^3)} \\ Peter Luschny, Nov 24 2011
  • SageMath
    def A197657(n):
        return 2^n*hypergeometric([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1).simplify_hypergeometric()
    for n in (0..21): print(A197657(n)) # Peter Luschny, Mar 26 2023
    

Formula

a(n) = Sum{k=0..n} Sum{j=0..2} Sum{i=0..2} (-1)^(j+i)*C(i,j)*C(n,k)^3*(n+1)^j*(k+1)^(2-j)/(k+1)^2. - Peter Luschny, Nov 02 2011
a(n) = Sum_{k=0..n} h(n,k)*binomial(n,k)^3, where h(n,k) = (1+k)*(1-((n-k)/(1+k))^3)/(1+2*k-n) if 1+2*k-n <> 0 else h(n,k) = 3. - Peter Luschny, Nov 24 2011
a(n) = A141147(n+1)/2 = A110707(n+1)/6 = (A000172(n)+A000172(n+1))/3. - Max Alekseyev, Jul 15 2014
Conjecture: (n+1)^2*a(n) -3*(n+1)*(2*n+1)*a(n-1) -3*n*(5*n-7)*a(n-2) -8*(n-2)^2*a(n-3)=0. - R. J. Mathar, Jul 26 2014
a(n) = 2^n*hypergeom([n + 1, -n/2, -n/2 - 1/2], [1, 1], 1). - Peter Luschny, Mar 26 2023
a(n) ~ sqrt(3) * 2^(3*n+1) / (Pi*n). - Vaclav Kotesovec, Apr 17 2023

A198257 Row sums of A197654.

Original entry on oeis.org

1, 6, 94, 1700, 35466, 795312, 18848992, 464517468, 11801240050, 307073982116, 8147186436324, 219664321959524, 6003343077661216, 165975724832822400, 4634768975107569024, 130553813782898706908, 3705740233107582161538, 105902829964290241990332
Offset: 0

Views

Author

Susanne Wienand, Oct 22 2011

Keywords

Comments

Number of meanders of length (n+1)*5 which are composed by arcs of equal length and a central angle of 72 degrees.
Definition of a meander:
A binary curve C is a triple (m, S, dir) such that
(a) S is a list with values in {L,R} which starts with an L,
(b) dir is a list of m different values, each value of S being allocated a value of dir,
(c) consecutive Ls increment the index of dir,
(d) consecutive Rs decrement the index of dir,
(e) the integer m>0 divides the length of S and
(f) C is a meander if each value of dir occurs length(S)/m times.
For this sequence, m = 5.
The terms are proved by brute force for 0 <= n <= 6, but not yet in general. [Susanne Wienand, Oct 29 2011]

Examples

			Some examples of list S and allocated values of dir if n = 5:
Length(S) = (5+1)*5 = 30.
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L
dir: 1,2,3,4,0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,0,1,2,3,4,0
  S: L,L,L,L,L,L,L,L,L,L,L,L,L,R,L,R,R,R,R,R,L,R,L,L,L,L,R,R,R,L
dir: 1,2,3,4,0,1,2,3,4,0,1,2,3,3,3,3,2,1,0,4,4,4,4,0,1,2,2,1,0,0
  S: L,L,L,L,L,R,L,L,L,R,R,L,L,L,L,L,R,R,L,R,R,L,R,R,L,L,L,L,L,R
dir: 1,2,3,4,0,0,0,1,2,2,1,1,2,3,4,0,0,4,4,4,3,3,3,2,2,3,4,0,1,1
Each value of dir occurs 30/5 = 6 times.
		

Crossrefs

Programs

  • Maple
    A198257 := proc(n) local i, j, k, pow;
    pow := (a, b) -> if a=0 and b=0 then 1 else a^b fi;
    add(add(add((-1)^(j+i)*binomial(i,j)*binomial(n,k)^5*pow(n+1,j)*pow(k+1,4-j)/(k+1)^4, i=0..4),j=0..4),k=0..n) end: seq(A198257(n), n=0..16); # Peter Luschny, Nov 02 2011
  • Mathematica
    Table[Sum[Sum[ Sum[(-1)^(j + i) Binomial[i, j], {i, 0, 4}] Binomial[n, k]^5*(n + 1)^j*(k + 1)^(4 - j), {j, 0, 4}]/(k + 1)^4, {k, 0, n}], {n, 0, 17}] (* Michael De Vlieger, Aug 18 2016 *)
  • PARI
    A198257(n) = {sum(k=0,n,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

Formula

a(n) = Sum{k=0..n} Sum{j=0..4} Sum{i=0..4} (-1)^(j+i)*C(i,j)*C(n,k)^5*(n+1)^j*(k+1)^(4-j)/(k+1)^4. - Peter Luschny, Nov 02 2011
a(n) = Sum_{k=0..n} 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
a(n) ~ sqrt(5) * 2^(5*n+2) / (Pi*n)^2. - Vaclav Kotesovec, Apr 17 2023
Showing 1-5 of 5 results.