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-7 of 7 results.

A242784 Number A(n,k) of permutations of [n] avoiding the consecutive step pattern given by the binary expansion of k, where 1=up and 0=down; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 4, 1, 1, 1, 1, 2, 5, 8, 1, 1, 1, 1, 2, 6, 17, 16, 1, 1, 1, 1, 2, 6, 21, 70, 32, 1, 1, 1, 1, 2, 6, 19, 90, 349, 64, 1, 1, 1, 1, 2, 6, 21, 70, 450, 2017, 128, 1, 1, 1, 1, 2, 6, 23, 90, 331, 2619, 13358, 256, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, May 22 2014

Keywords

Examples

			A(4,5) = 19 because there are 4! = 24 permutations of {1,2,3,4} and only 5 of them do not avoid the consecutive step pattern up, down, up given by the binary expansion of 5 = 101_2: (1,3,2,4), (1,4,2,3), (2,3,1,4), (2,4,1,3), (3,4,1,2).
Square array A(n,k) begins:
  1, 1,   1,     1,     1,     1,     1,     1,     1, ...
  1, 1,   1,     1,     1,     1,     1,     1,     1, ...
  1, 1,   2,     2,     2,     2,     2,     2,     2, ...
  1, 1,   4,     5,     6,     6,     6,     6,     6, ...
  1, 1,   8,    17,    21,    19,    21,    23,    24, ...
  1, 1,  16,    70,    90,    70,    90,   111,   116, ...
  1, 1,  32,   349,   450,   331,   450,   642,   672, ...
  1, 1,  64,  2017,  2619,  1863,  2619,  4326,  4536, ...
  1, 1, 128, 13358, 17334, 11637, 17334, 33333, 34944, ...
		

Crossrefs

Columns give: 0, 1: A000012, 2: A011782, 3: A049774, 4, 6: A177479, 5: A177477, 7: A117158, 8, 14: A177518, 9: A177519, 10: A177520, 11, 13: A177521, 12: A177522, 15: A177523, 16, 30: A177524, 17: A177525, 18, 22: A177526, 19, 25: A177527, 20, 26: A177528, 21: A177529, 23, 29: A177530, 24, 28: A177531, 27: A177532, 31: A177533, 32, 62: A177534, 33: A177535, 34, 46: A177536, 35, 49: A177537, 36, 54: A177538, 37, 41: A177539, 38: A177540, 39, 57: A177541, 40, 58: A177542, 42: A177543, 43, 53: A177544, 44, 50: A177545, 45: A177546, 47, 61: A177547, 48, 60: A177548, 51: A177549, 52: A177550, 55, 59: A177551, 56: A177552, 63: A177553, 127: A230051, 255: A230231, 511: A230232, 1023: A230233, 2047: A254523.
Main diagonal gives A242785.

Programs

  • Maple
    A:= proc(n, k) option remember; local b, m, r, h;
          if k<2 then return 1 fi;
          m:= iquo(k, 2, 'r'); h:= 2^ilog2(k);
          b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t=m and r=0, 0, add(b(u-j, o+j-1, irem(2*t, h)), j=1..u))+
          `if`(t=m and r=1, 0, add(b(u+j-1, o-j, irem(2*t+1, h)), j=1..o)))
          end; forget(b);
          b(n, 0, 0)
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..15);
  • Mathematica
    Clear[A]; A[n_, k_] := A[n, k] = Module[{b, m, r, h}, If[k < 2, Return[1]]; {m, r} = QuotientRemainder[k, 2]; h = 2^Floor[Log[2, k]]; b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1, If[t == m && r == 0, 0, Sum[b[u - j, o + j - 1, Mod[2*t, h]], {j, 1, u}]] + If[t == m && r == 1, 0, Sum[b[u + j - 1, o - j, Mod[2*t + 1, h]], {j, 1, o}]]]; b[n, 0, 0]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Sep 22 2014, translated from Maple *)

A230051 Number of permutations of [n] avoiding adjacent step pattern {up}^7.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40319, 362863, 3628550, 39913170, 478947480, 6226179960, 87164597520, 1307440134000, 20918580896069, 355608034188517, 6400803479701178, 121612584595293870, 2432198062707745560, 51075033128533094520, 1123625953230764250960
Offset: 0

Views

Author

Alois P. Heinz, Oct 07 2013

Keywords

Examples

			a(8) = 40319 = 8!-1: only permutation 12345678 does not avoid {up}^7.
		

References

  • R. E. L. Aldred, M. D. Atkinson, D. J. McCaughan, Avoiding consecutive patterns in permutations. Adv. in Appl. Math., 45(3), 449-461, 2010.

Crossrefs

Column k=127 of A242784.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<6, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
          add(b(u-j, o+j-1, 0), j=1..u))
        end:
    a:= n-> b(n, 0, 0):
    seq(a(n), n=0..30);
  • Mathematica
    nn=20;r=7;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
    CoefficientList[Series[4/(E^(-x) + Cos[x] - Sin[x] + 2*Cos[x/Sqrt[2]] * Cosh[x/Sqrt[2]] - Sqrt[2] * Cos[x/Sqrt[2]] * Sinh[x/Sqrt[2]] - Sqrt[2] * Cosh[x/Sqrt[2]] * Sin[x/Sqrt[2]]),{x,0,20}],x] * Range[0,20]! (* Vaclav Kotesovec, Aug 23 2014 *)

Formula

E.g.f.: 1 / Sum_{n>=0} (8*n+1-x)*x^(8*n)/(8*n+1)!.
E.g.f. (Aldred, Atkinson, McCaughan, 2010): 4/(exp(-x) + cos(x) - sin(x) + 2*cos(x/sqrt(2))*cosh(x/sqrt(2)) - sqrt(2)*cos(x/sqrt(2))*sinh(x/sqrt(2)) - sqrt(2)*cosh(x/sqrt(2))*sin(x/sqrt(2))). - Vaclav Kotesovec, Aug 23 2014
a(n)/n! ~ c / r^n, where r = 1.0000220496837836995332841475679738951237308817759821845322... is the root of the equation exp(-r) + cos(r) - sin(r) + 2*cos(r/sqrt(2)) * cosh(r/sqrt(2)) - sqrt(2)*cos(r/sqrt(2)) * sinh(r/sqrt(2)) - sqrt(2) * cosh(r/sqrt(2)) * sin(r/sqrt(2)) = 0, c = 2*sqrt(2) / (r*sqrt(2 + cosh(sqrt(2)*r) - cos(2*r) + 2*cosh(r/sqrt(2)) * (2*sqrt(2)*sin(r) * sin(r/sqrt(2)) - cos(sqrt(2)*r) * cosh(r/sqrt(2))))) = 1.0001516144914746839400607922657094772985420791612537... . - Vaclav Kotesovec, Aug 23 2014, updated Feb 01 2015

A230231 Number of permutations of [n] avoiding adjacent step pattern {up}^8.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362879, 3628781, 39916492, 478996716, 6226941864, 87176969880, 1307651304960, 20922368987520, 355679390626560, 6402213152423659, 121641748198554547, 2432828930036156696, 51089280818439941448, 1123961390341566969192
Offset: 0

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<7, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
          add(b(u-j, o+j-1, 0), j=1..u))
        end:
    a:= n-> b(n, 0, 0):
    seq(a(n), n=0..30);
  • Mathematica
    nn=20;r=8;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
    CoefficientList[Series[1/(HypergeometricPFQ[{}, {1/9, 2/9, 1/3, 4/9, 5/9, 2/3, 7/9, 8/9}, x^9/387420489] - x*HypergeometricPFQ[{}, {2/9, 1/3, 4/9, 5/9, 2/3, 7/9, 8/9, 10/9}, x^9/387420489]), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Feb 01 2015 *)

Formula

E.g.f.: 1 / Sum_{n>=0} (9*n+1-x)*x^(9*n)/(9*n+1)!.
a(n)/n! ~ 1.0000195665100891649606434859189953881417919885320660432331680939719... * (1/r)^n, where r = 1.0000024802134092668222044475851121972165291678378389183730077680957571... is the root of the equation Sum_{n>=0} (r^(9*n)/(9*n)! - r^(9*n+1)/(9*n+1)!) = 0. - Vaclav Kotesovec, Jan 17 2015
E.g.f.: 1/(1/3 * cos((sqrt(3)*x)/2) * cosh(x/2) + 2/9 * cos(x * sin(Pi/9)) * cosh(x * cos(Pi/9)) + 2/9 * cos(Pi/9) * cos(x * sin(Pi/9)) * cosh(x * cos(Pi/9)) + 2/9 * cos(x * cos(Pi/18)) * cosh(x * sin(Pi/18)) + 2/9 * cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9)))* cosh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))) - 1/9 * cos(Pi/9) * cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9))) * cosh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))) - 2/9 * cos(x * cos(Pi/18))* cosh(x * sin(Pi/18)) * sin(Pi/18) - (cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9)))* cosh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9)))* sin(Pi/9))/(3 * sqrt(3)) - (cosh(x/2) * sin((sqrt(3)*x)/2))/(3 * sqrt(3)) - 2/9 * cos(Pi/18) * cosh(x * sin(Pi/18)) * sin(x * cos(Pi/18)) - (cos(Pi/9) * cosh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9)))* sin(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9))))/ (3 * sqrt(3)) + 1/9 * cosh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9)))* sin(Pi/9) * sin(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9))) - 2/9 * cosh(x * cos(Pi/9)) * sin(Pi/9)* sin(x * sin(Pi/9)) - 1/3 * cos((sqrt(3)*x)/2)* sinh(x/2) + (sin((sqrt(3)*x)/2) * sinh(x/2))/ (3 * sqrt(3)) - 2/9 * cos(x * sin(Pi/9))* sinh(x * cos(Pi/9)) - 2/9 * cos(Pi/9) * cos(x * sin(Pi/9))* sinh(x * cos(Pi/9)) + 2/9 * sin(Pi/9) * sin(x * sin(Pi/9))* sinh(x * cos(Pi/9)) + 2/9 * cos(x * cos(Pi/18))* sinh(x * sin(Pi/18)) - 2/9 * cos(x * cos(Pi/18))* sin(Pi/18) * sinh(x * sin(Pi/18)) - 2/9 * cos(Pi/18)* sin(x * cos(Pi/18)) * sinh(x * sin(Pi/18)) + 2/9 * cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9)))* sinh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))) - 1/9 * cos(Pi/9) * cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9))) * sinh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))) - (cos(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9))) * sin(Pi/9)* sinh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))))/ (3 * sqrt(3)) - (cos(Pi/9) * sin(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9)))* sinh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9))))/ (3 * sqrt(3)) + 1/9 * sin(Pi/9)* sin(x/2*(sqrt(3) * cos(Pi/9) - sin(Pi/9)))* sinh(x/2*(cos(Pi/9) + sqrt(3) * sin(Pi/9)))). - Vaclav Kotesovec, Feb 01 2015

A230232 Number of permutations of [n] avoiding adjacent step pattern {up}^9.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628799, 39916779, 479001228, 6227014404, 87178179816, 1307672369640, 20922752672640, 355686706327680, 6402359109968640, 121644792614741760, 2432895242801771955, 51090787299486057355, 1123997039003038423610
Offset: 0

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<8, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
          add(b(u-j, o+j-1, 0), j=1..u))
        end:
    a:= n-> b(n, 0, 0):
    seq(a(n), n=0..30);
  • Mathematica
    nn=20;r=9;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
    FullSimplify[CoefficientList[Series[10/(2/E^x - Sqrt[2*(5 - Sqrt[5])]* Cosh[(1/4)*(1 + Sqrt[5])*x]* Sin[Sqrt[(1/8)*(5 - Sqrt[5])]*x] - Sqrt[2*(5 + Sqrt[5])]*Cosh[(1/4)*(Sqrt[5] - 1)* x]*Sin[Sqrt[(1/8)*(5 + Sqrt[5])]*x] + Cos[Sqrt[(1/8)*(5 + Sqrt[5])]*x]* (4*Cosh[(1/4)*(Sqrt[5] - 1)*x] - (Sqrt[5] - 1)*Sinh[(1/4)*(Sqrt[5] - 1)*x]) - Cos[Sqrt[(1/8)*(5 - Sqrt[5])]*x]* ((1 + Sqrt[5])*Sinh[(1/4)*(1 + Sqrt[5])*x] - 4*Cosh[(1/4)*(1 + Sqrt[5])*x])), {x, 0, 20}], x] * Range[0, 20]!] (* Vaclav Kotesovec, Jan 31 2015 *)

Formula

E.g.f.: 1 / Sum_{n>=0} (10*n+1-x)*x^(10*n)/(10*n+1)!.
a(n)/n! ~ c * (1/r)^n, where r = 1.0000002505217051890946793081039639693008257169189079028339632923816... is the root of the equation Sum_{n>=0} (r^(10*n)/(10*n)! - r^(10*n+1)/(10*n+1)!) = 0, c = 1.000002229648140602899529055054469878816530201510267349345270187155... . - Vaclav Kotesovec, Jan 17 2015
E.g.f.: 10 / (2/exp(x) - sqrt(2*(5 - sqrt(5))) * cosh((1/4)*(1 + sqrt(5))*x) * sin(sqrt((1/8)*(5 - sqrt(5)))*x) - sqrt(2*(5 + sqrt(5))) * cosh((1/4)*(sqrt(5) - 1)*x) * sin(sqrt((1/8)*(5 + sqrt(5)))*x) + cos(sqrt((1/8)*(5 + sqrt(5)))*x) * (4*cosh((1/4)*(sqrt(5) - 1)*x) - (sqrt(5) - 1)*sinh((1/4)*(sqrt(5) - 1)*x)) - cos(sqrt((1/8)*(5 - sqrt(5)))*x) * ((1 + sqrt(5))*sinh((1/4)*(1 + sqrt(5))*x) - 4*cosh((1/4)*(1 + sqrt(5))*x))). - Vaclav Kotesovec, Jan 31 2015
In closed form, c = 5 / (r * (sqrt(10 - 2*sqrt(5)) * cosh((sqrt(5)+1)*r/4) * sin(sqrt((5 - sqrt(5))/2)*r/2) + sqrt(2*(5 + sqrt(5))) * cosh((sqrt(5)-1)*r/4) * sin(sqrt((5 + sqrt(5))/2)*r/2))). - Vaclav Kotesovec, Feb 01 2015

A230233 Number of permutations of [n] avoiding adjacent step pattern {up}^10.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916799, 479001577, 6227020358, 87178283010, 1307674215120, 20922786961440, 355687370176320, 6402372516146880, 121645075013280000, 2432901444395385600, 51090929159028595200, 1124000415686590747031
Offset: 0

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<9, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
          add(b(u-j, o+j-1, 0), j=1..u))
        end:
    a:= n-> b(n, 0, 0):
    seq(a(n), n=0..30);
  • Mathematica
    nn=20;r=10;a=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Range[0,nn]! CoefficientList[Series[1/(1-x-a),{x,0,nn}],x] (* Geoffrey Critzer, Feb 25 2014 *)
    CoefficientList[Series[1/(HypergeometricPFQ[{}, {1/11, 2/11, 3/11, 4/11, 5/11, 6/11, 7/11, 8/11, 9/11, 10/11}, x^11/285311670611] - x*HypergeometricPFQ[{}, {2/11, 3/11, 4/11, 5/11, 6/11, 7/11, 8/11, 9/11, 10/11, 12/11}, x^11/285311670611]), {x, 0, 25}], x] * Range[0, 25]! (* Vaclav Kotesovec, Jan 17 2015 *)

Formula

E.g.f.: 1 / Sum_{n>=0} (11*n+1-x)*x^(11*n)/(11*n+1)!.
a(n)/n! ~ 1.000000227556759905306252970186381144189779110025896440589711080508... * (1/r)^n, where r = 1.000000022964438439732421879840792836238519233492197325926442472620564... is the root of the equation Sum_{n>=0} (r^(11*n)/(11*n)! - r^(11*n+1)/(11*n+1)!) = 0. - Vaclav Kotesovec, Jan 17 2015
E.g.f.: -11/(2*((-cos(x*cos(Pi/22)))* cosh(x*sin(Pi/22)) - cos(x*cos(3*Pi/22))* cosh(x*sin(3*Pi/22)) - cos(x*cos(5*Pi/22))* cosh(x*sin(5*Pi/22)) - cos(x*cos(Pi/22))* cosh(x*sin(Pi/22))*sin(Pi/22) + cos(x*cos(3*Pi/22))* cosh(x*sin(3*Pi/22))* sin(3*Pi/22) - cos(x*cos(5*Pi/22))* cosh(x*sin(5*Pi/22))* sin(5*Pi/22) + cos(Pi/22)* cosh(x*sin(Pi/22))* sin(x*cos(Pi/22)) + cos(3*Pi/22)*cosh( x*sin(3*Pi/22))* sin(x*cos(3*Pi/22)) + cos(5*Pi/22)*cosh( x*sin(5*Pi/22))* sin(x*cos(5*Pi/22)) - cosh(x*cos(Pi/11))* ((1 + cos(Pi/11))* cos(x*sin(Pi/11)) - sin(Pi/11)*sin(x*sin(Pi/11))) + cosh(x*cos(2*Pi/11))* ((-1 + cos(2*Pi/11))* cos(x*sin(2*Pi/11)) + sin(2*Pi/11)* sin(x*sin(2*Pi/11))) + cos(x*sin(Pi/11))* sinh(x*cos(Pi/11)) + cos(Pi/11)*cos(x*sin(Pi/11))* sinh(x*cos(Pi/11)) - sin(Pi/11)*sin(x*sin(Pi/11))* sinh(x*cos(Pi/11)) - cos(x*sin(2*Pi/11))* sinh(x*cos(2*Pi/11)) + cos(2*Pi/11)* cos(x*sin(2*Pi/11))* sinh(x*cos(2*Pi/11)) + sin(2*Pi/11)* sin(x*sin(2*Pi/11))* sinh(x*cos(2*Pi/11)) + cos(x*cos(Pi/22))* sinh(x*sin(Pi/22)) + cos(x*cos(Pi/22))*sin(Pi/22)* sinh(x*sin(Pi/22)) - cos(Pi/22)*sin(x*cos(Pi/22))* sinh(x*sin(Pi/22)) - cos(x*cos(3*Pi/22))* sinh(x*sin(3*Pi/22)) + cos(x*cos(3*Pi/22))* sin(3*Pi/22)* sinh(x*sin(3*Pi/22)) + cos(3*Pi/22)* sin(x*cos(3*Pi/22))* sinh(x*sin(3*Pi/22)) + cos(x*cos(5*Pi/22))* sinh(x*sin(5*Pi/22)) + cos(x*cos(5*Pi/22))* sin(5*Pi/22)* sinh(x*sin(5*Pi/22)) - cos(5*Pi/22)* sin(x*cos(5*Pi/22))* sinh(x*sin(5*Pi/22)))). - Vaclav Kotesovec, Jan 31 2015

A230055 Number of permutations of [n] in which the longest increasing run has length 7.

Original entry on oeis.org

1, 14, 181, 2360, 32010, 456720, 6881160, 109546009, 1841298059, 32629877967, 608572228291, 11923667699474, 244964063143590, 5267496652725480, 118348438201424761, 2773714509551524351, 67705791536824698266, 1718769199589362743761, 45314525515737783596251
Offset: 7

Views

Author

Alois P. Heinz, Oct 07 2013

Keywords

Examples

			a(7) = 1: 1234567.
a(8) = 14: 12345687, 12345786, 12346785, 12356784, 12456783, 13456782, 21345678, 23456781, 31245678, 41235678, 51234678, 61234578, 71234568, 81234567.
		

Crossrefs

Column k=7 of A008304.

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1,
          `if`(t b(n, 0, 0, 7)-b(n, 0, 0, 6):
    seq(a(n), n=7..30);
  • Mathematica
    b[u_, o_, t_, k_] := b[u, o, t, k] = If[u + o == 0, 1, If[t < k - 1, Sum[b[u + j - 1, o - j, t + 1, k], {j, 1, o}], 0] + Sum[b[u - j, o + j - 1, 0, k], {j, 1, u}]];
    a[n_] := b[n, 0, 0, 7] - b[n, 0, 0, 6];
    Table[a[n], {n, 7, 30}] (* Jean-François Alcover, Jul 19 2018, after Alois P. Heinz *)

Formula

a(n) = A230051(n) - A177553(n).
E.g.f.: 1/Sum_{n>=0} (8*n+1-x)*x^(8*n)/(8*n+1)! - 1/Sum_{n>=0} (7*n+1-x)*x^(7*n)/(7*n+1)!.

A254523 Number of permutations of [n] avoiding adjacent step pattern {up}^11.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001599, 6227020775, 87178290682, 1307674357710, 20922789683040, 355687423926240, 6402373618334400, 121645098513933120, 2432901965590252800, 51090941178938707200, 1124000703770606323200
Offset: 0

Views

Author

Vaclav Kotesovec, Jan 31 2015

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<10, add(b(u+j-1, o-j, t+1), j=1..o), 0)+
          add(b(u-j, o+j-1, 0), j=1..u))
        end:
    a:= n-> b(n, 0, 0):
    seq(a(n), n=0..30); # after Alois P. Heinz
  • Mathematica
    CoefficientList[Series[6 / (Exp[-x] + Cos[x] + 2*Cos[x/2] * Cosh[Sqrt[3]*x/2] - Cosh[Sqrt[3]*x/2]*Sin[x/2] - Sin[x] + Cosh[x/2] * (2*Cos[Sqrt[3]*x/2] - Sqrt[3]*Sin[Sqrt[3]*x/2]) - Cos[Sqrt[3]*x/2]*Sinh[x/2] - Sqrt[3]*Cos[x/2]*Sinh[Sqrt[3]*x/2]), {x, 0, 25}], x] * Range[0, 25]!

Formula

E.g.f.: 1 / Sum_{n>=0} (12*n+1-x)*x^(12*n)/(12*n+1)!.
E.g.f.: 6 / (exp(-x) + cos(x) + 2*cos(x/2)*cosh(sqrt(3)*x/2) - cosh(sqrt(3)*x/2)*sin(x/2) - sin(x) + cosh(x/2)*(2*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)) - cos(sqrt(3)*x/2)*sinh(x/2) - sqrt(3)*cos(x/2)*sinh(sqrt(3)*x/2)).
a(n)/n! ~ c * (1/r)^n, where r = 1.0000000019270853046730165249753673978954992128247736041276... is the root of the equation Sum_{n>=0} (r^(12*n)/(12*n)! - r^(12*n+1)/(12*n+1)!) = 0, equivalently root of the equation exp(-r) + cos(r) + 2*cos(r/2)*cosh(sqrt(3)*r/2) - cosh(sqrt(3)*r/2)*sin(r/2) - sin(r) + cosh(r/2)*(2*cos(sqrt(3)*r/2) - sqrt(3)*sin(sqrt(3)*r/2)) - cos(sqrt(3)*r/2)*sinh(r/2) - sqrt(3)*cos(r/2)*sinh(sqrt(3)*r/2) = 0, c = 3/(r*sqrt((cosh(sqrt(3)*r/2) * sin(r/2) + sin(r))^2 + 2*sqrt(3)*cosh(r/2) * (cosh(sqrt(3)*r/2) * sin(r/2) + sin(r)) * sin(sqrt(3)*r/2) + 3*cosh(r/2)^2 * sin((sqrt(3)*r)/2)^2)) = 1.0000000210373483515818712802156496756788404534079689145773611990529818919... .
Showing 1-7 of 7 results.