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.

User: Feng Jishe

Feng Jishe's wiki page.

Feng Jishe has authored 5 sequences.

A335857 a(n) is the determinant of the n X n Hankel matrix A with A(i,j) = A000108(i+j+6) for 0<=i,j<=n-1.

Original entry on oeis.org

1, 132, 4719, 81796, 884884, 6852768, 41314284, 204951252, 869562265, 3245256300, 10880587575, 33309352440, 94307358288, 249485071616, 621856804272, 1470540624696, 3318218562009, 7179339254516, 14955909351383, 30104651175324, 58733021049780, 111358254207200
Offset: 0

Author

Feng Jishe, Oct 12 2020

Keywords

Comments

Starting with 132 = A000108(6), the sequence is the Hankel transform of the Catalan numbers shifted to remove the first 6 terms.

Examples

			a(1) = 132 because 132 is the determinant of the 1 X 1 matrix [132].
a(2) = 4719 because 4719 is the determinant of the matrix
    [ 132  429 ]
    [ 429 1430 ].
a(3) = 81796 because 81796 is the determinant of the matrix
    [  132,  429,  1430 ]
    [  429, 1430,  4862 ]
    [ 1430, 4862, 16796 ].
G.f. = 1 + 132*x + 4719*x^2 + 81796*x^3 + 884884*x^4 + ... - _Michael Somos_, Jun 27 2023
		

Crossrefs

Hankel transforms of the Catalan numbers shifted by k for k=0..5 are A000012, A000012, A000027, A000330, A006858, A091962.
Cf. A000108 (Catalan numbers).

Programs

  • Mathematica
    Table[Binomial[n+5, 5]*Binomial[2*n+7, 3]*Binomial[2*n+9, 7]/1260, {n,0,30}] (* G. C. Greubel, Dec 17 2021 *)
    a[ n_] := Binomial[n+5, 4]*Binomial[2*n+7, 3]*Binomial[2*n+9, 8]/1575; (* Michael Somos, Jun 27 2023 *)
  • PARI
    H(seq)={my(n=(#seq+1)\2); matdet(matrix(n,n,i,j,seq[i+j-1]))}
    a(n, k=6)={H(vector(2*n, i, my(t=i+k-1); binomial(2*t,t)/(t+1)))} \\ Andrew Howroyd, Nov 26 2020
    
  • PARI
    {a(n) = prod(k=1, 5, (n+k)^min(6-k, k)) * prod(k=1, 4, (2*n+2*k+1)^min(5-k, k))/285768000}; /* Michael Somos, Jun 27 2023 */
    
  • Sage
    [binomial(n+5, 5)*binomial(2*n+7, 3)*binomial(2*n+9, 7)/1260 for n in (0..30)] # G. C. Greubel, Dec 17 2021

Formula

a(n) = 2^5/(5 * 7!* 9!)*(n + 1)*(n + 2)^2*(n + 3)^3 *(n + 4)^2*(n + 5)*(2*n + 3)*(2*n + 5)^2*(2*n + 7)^2*(2*n + 9).
From G. C. Greubel, Dec 17 2021: (Start)
a(n) = binomial(n+5, 5)*binomial(2*n+7, 3)*binomial(2*n+9, 7)/1260.
G.f.: (1 + 116*x + 2727*x^2 + 21572*x^3 + 70328*x^4 + 103376*x^5 + 70328*x^6 + 21572*x^7 + 2727*x^8 + 116*x^9 + x^10)/(1 - x)^16. (End)
a(n) = -a(-6-n) for all n in Z. - Michael Somos, Jun 27 2023
a(n) ~ n^15/4465125. - Stefano Spezia, Dec 09 2023

A296619 The number of nonnegative walks of n steps with step sizes 1 and 2, starting at 0 and ending at 2.

Original entry on oeis.org

0, 1, 1, 6, 13, 52, 152, 550, 1813, 6453, 22427, 80330, 286895, 1038931, 3772801, 13807294, 50726893, 187332517, 694364517, 2583714636, 9644852364, 36115537269, 135607526865, 510496492338, 1926284451923, 7284476707597, 27602839227883, 104791979218326
Offset: 0

Author

Feng Jishe, Dec 17 2017

Keywords

Comments

a(n) is the number of 2-D walks with n steps of type {(1,-2), (1,-1), (1,1), or (1,2)} starting at (0,0), ending at (n,2), and not dropping below the x-axis.
The sequence corresponds to element (1,3) of the matrix B(n)^n (see Maple script). Furthermore, element (1,1) of the matrix is A187430, the element (1,2) of these matrix is A055113.

Examples

			There are 6 walks of length 3:
        __
       |  |         __
     __|  |_     __|  |_     __    _
    |           |           |  |__|
   _|          _|          _|
    2+2-2=2     2+1-1=2     2-1+1=2
                    __
     __    _       |  |_           _
    |  |  |      __|         __   |
   _|  |__|    _|          _|  |__|
    2-2+2=2     1+2-1=2     1-1+2=2
		

Crossrefs

Programs

  • Maple
    B := n -> LinearAlgebra:-ToeplitzMatrix([0,1,1, seq(0, k=0..n-2)], symmetric):
    seq((B(n)^n)(1, 3), n=0..27);
    # alternative:
    T:= proc(n,k) option remember;
      if k < 0 or k > 2*n then return 0 fi;
      procname(n-1,k-2)+procname(n-1,k-1)+procname(n-1,k+1)+procname(n-1,k+2)
    end proc:
    T(0,0):= 1:
    seq(T(n,2),n=0..40); # Robert Israel, Dec 19 2017
  • Mathematica
    b[n_] := ToeplitzMatrix[Join[{0,1,1}, ConstantArray[0,n-1]]];
    Prepend[Table[MatrixPower[b[n],n][[1,3]], {n,20}], 0]
    (* Andrey Zabolotskiy, Dec 19 2017 *)
  • PARI
    Next(v)={vector(#v+2, i, if(i<3||i>#v-2, 0, v[i-2]+v[i-1]+v[i+1]+v[i+2]))}
    my(v=vector(7,i,i==3)); for(n=1, 50, print1(v[5],", "); v=Next(v)) \\ Andrew Howroyd, Dec 18 2017

Formula

a(n) = A185286(n,2). - Robert Israel, Dec 19 2017

A277248 Number of planar walks starting at (1,1), ending at (3n,0), remaining in the first quadrant and using steps (-1,2) and (2,-1).

Original entry on oeis.org

1, 2, 6, 24, 108, 528, 2724, 14616, 80760, 456552, 2628504, 15360216, 90879096, 543336912, 3277586136, 19924733088, 121943223576, 750756116376, 4646484480552, 28892787031008, 180420486241776, 1130930538186360, 7113550964713848, 44885329202906448
Offset: 1

Author

Feng Jishe, Oct 06 2016

Keywords

Crossrefs

Cf. A048116.

Programs

  • Maple
    b:= proc(l) option remember; `if`(l=[1$2], 1, add((p->
          `if`(p[1]<0, 0, b(p)))(sort((l-x))), x=[[-1, 2], [2, -1]]))
        end:
    a:= n-> b([0,3*n]):
    seq(a(n), n=1..30);  # Alois P. Heinz, Oct 06 2016
  • Mathematica
    b[l_List] := b[l] = If[l == {1, 1}, 1, Sum[Function[p, If[p[[1]]<0, 0, b[p]]][Sort[l-x]], {x, {{-1, 2}, {2, -1}}}]]; a[n_] := b[{0, 3n}]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Dec 04 2016 after Alois P. Heinz *)

Formula

a(n) ~ c * (27/4)^n / n^(3/2), where c = 0.06045583689606517807688682344735167414726208387456561322459238109992522838... . - Vaclav Kotesovec, Oct 07 2016

Extensions

More terms from Alois P. Heinz, Oct 06 2016

A270174 a(n) is the number of different ways to seat a set of n married male-female couples at a straight table so that men and women alternate and every man is separated by at least two men from his wife.

Original entry on oeis.org

0, 0, 0, 0, 240, 8640, 584640, 40239360, 3493808640, 364941158400, 45683021260800, 6754660222464000, 1166167699041945600, 232618987254682828800, 53114643986227439616000, 13768242163527512973312000, 4021980517038414919532544000, 1315337131173516220415213568000
Offset: 1

Author

Feng Jishe, Mar 12 2016

Keywords

Comments

We assume that the chairs are uniform and indistinguishable.
First we arrange the women in alternating seats, in 2*n! ways. Second, we find the number, G_{n} say, of ways of arranging men in the remaining seats such that every husband cannot sit at the left or right next 1, 2, ..., h male's seats from his wife. Note that here h = 2. We give the board B4, where X denotes the seat cannot be set at, where there are h X's in first column, and h+1 X's in first row, ..., 2h X's in the h column, ..., other entries are 1's. Thus the number of different ways to seat a set of n married male-female couples at a straight table is a_{n}=2*n!*G_{n}.

Crossrefs

Formula

a(n) = 2*n! * A292574(n). - Andrew Howroyd, Sep 19 2017

Extensions

a(11)-a(18) from Andrew Howroyd, Sep 19 2017

A267060 a(n) = number of different ways to seat a set of n married male-female couples at a round table so that men and women alternate and every man is separated by at least d = 2 men from his wife.

Original entry on oeis.org

0, 0, 0, 0, 24, 240, 22320, 1330560, 112210560, 11183235840, 1340192044800, 189443216793600, 31267307962598400, 5964702729085900800, 1303453560329957836800, 323680816052170536960000, 90679832709074132299776000, 28473630606612014817337344000
Offset: 1

Author

Feng Jishe, Jan 09 2016

Keywords

Comments

We assume that the chairs are uniform and indistinguishable.
First we arrange the females in alternating seats by circular permutation, there are (n-1)! ways. Secondly, we evaluate the number F_{n}, ways of arranging males in the remaining seats as mentioned in the definition above.
By the principle of inclusion-exclusion and theory of rook polynomial Vl, we obtain that a_{n} = (n-1)!*F_{n}, F_{n} = sum(-1)^{k}*r_{k}(B3)*(n-k)! where r_{k}(B3) is the number of ways of putting k non-taking rooks on positions 1's of B3, and the rook polynomials are R_{B3}(x) = sum r_{k}(B3)*x^{k}.
Also F_{n} = per(B3), here per(B3) denotes the permanent of matrix (board) B3, but it is very difficult problem to evaluate the value, per(B3).

Examples

			For d=1, the sequence a_{n} is the classical menage sequence A094047.
For d=2 (the current sequence), the F(n)s are 0, 0, 0, 0, 1, 2, 31, 264, 2783, 30818, 369321, ... which is A004307(n) then the sequence a_{n} is 0, 0, 0, 0, 24, 240, 22320, 1330560, 112210560, 11183235840, 1340192044800,...
For d=3, the F(n)s are 0, 0, 0, 0, 0, 0, 1, 2, 78, 888, 13909, ... which is A184965, and a(n) = (n-1)!*A184965(n).
		

References

  • G. Polya, Aufgabe 424, Arch. Math. Phys. (3) 20 (1913) 271.
  • John Riordan. The enumeration of permutations with three-ply staircase restrictions.

Crossrefs

Programs

  • Mathematica
    b[n_, n0_] := Permanent[Table[If[(0 <= j - i && j - i < n - n0) || j - i < -n0, 1, 0], {i, 1, n}, {j, 1, n}]];
    A004307[n_] := b[n, 4];
    a[n_] := (n - 1)!*A004307[n];
    Array[a, 18] (* Jean-François Alcover, Oct 08 2017 *)

Formula

a(n) = (n-1)! * A004307(n). - Andrew Howroyd, Sep 19 2017

Extensions

a(12)-a(18) from Andrew Howroyd, Sep 19 2017