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

A049774 Number of permutations of n elements not containing the consecutive pattern 123.

Original entry on oeis.org

1, 1, 2, 5, 17, 70, 349, 2017, 13358, 99377, 822041, 7477162, 74207209, 797771521, 9236662346, 114579019469, 1516103040833, 21314681315998, 317288088082405, 4985505271920097, 82459612672301846, 1432064398910663705, 26054771465540507273, 495583804405888997218
Offset: 0

Views

Author

Tuwani A. Tshifhumulo (tat(AT)caddy.univen.ac.za)

Keywords

Comments

Permutations on n letters without double falls. A permutation w has a double fall at k if w(k) > w(k+1) > w(k+2) and has an initial fall if w(1) > w(2).
Hankel transform is A055209. - Paul Barry, Jan 12 2009
Increasing colored 1-2 trees of order n with choice of two colors for the right branches of the vertices of outdegree 2 except those vertices on the path from the root to the leftmost leaf. - Wenjin Woan, May 21 2011

Examples

			Permutations without double increase and without pattern 123:
a(3) = 5: 132, 213, 231, 312, 321.
a(4) = 17: 1324, 1423, 1432, 2143, 2314, 2413, 2431, 3142, 3214, 3241, 3412, 3421, 4132, 4213, 4231, 4312, 4321.
		

References

  • F. N. David and D. E. Barton, Combinatorial Chance, Hafner, New York, 1962, pp. 156-157.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (5.2.17).

Crossrefs

Column k=0 of A162975.
Column k=3 of A242784.
Equals 1 + A000303. - Greg Dresden, Feb 22 2020

Programs

  • Maple
    b:= proc(u, o, t) option remember;
         `if`(u+o=0, 1, add(b(u-j, o+j-1, 0), j=1..u)+
         `if`(t=1, 0,   add(b(u+j-1, o-j, 1), j=1..o)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..23);  # Alois P. Heinz, Nov 04 2021
  • Mathematica
    Table[Simplify[ n! SeriesCoefficient[ Series[ Sqrt[3] Exp[x/2]/(Sqrt[3] Cos[Sqrt[3]/2 x] - Sin[Sqrt[3]/2 x]), {x, 0, n}], n] ], {n, 0, 40}]
    (* Second program: *)
    b[u_, o_, t_, k_] := b[u, o, t, k] = If[t == k, (u + o)!, If[Max[t, u] + o < k, 0, Sum[b[u + j - 1, o - j, t + 1, k], {j, 1, o}] + Sum[b[u - j, o + j - 1, 1, k], {j, 1, u}]]];
    a[n_] := b[0, n, 0, 2] - b[0, n, 0, 3] + 1;
    a /@ Range[0, 40] (* Jean-François Alcover, Nov 09 2020, after Alois P. Heinz in A000303 *)

Formula

E.g.f.: 1/Sum_{i>=0} (x^(3*i)/(3*i)! - x^(3*i+1)/(3*i+1)!). [Corrected g.f. --> e.g.f. by Vaclav Kotesovec, Feb 15 2015]
Equivalently, e.g.f.: exp(x/2) * r / sin(r*x + (2/3)*Pi) where r = sqrt(3)/2. This has simple poles at (3*m+1)*x0 where x0 = Pi/sqrt(6.75) = 1.2092 approximately and m is an arbitrary integer. This yields the asymptotic expansion a(n)/n! ~ x0^(-n-1) * Sum((-1)^m * E^(3*m+1) / (3*m+1)^(n+1)) where E = exp(x0/2) = 1.8305+ and m ranges over all integers. - Noam D. Elkies, Nov 15 2001
E.g.f.: sqrt(3)*exp(x/2)/(sqrt(3)*cos(x*sqrt(3)/2) - sin(x*sqrt(3)/2) ); a(n+1) = Sum_{k=0..n} binomial(n, k)*a(k)*b(n-k) where b(n) = number of n-permutations without double falls and without initial falls. - Emanuele Munarini, Feb 28 2003
O.g.f.: A(x) = 1/(1 - x - x^2/(1 - 2*x - 4*x^2/(1 - 3*x - 9*x^2/(1 - ... - n*x - n^2*x^2/(1 - ...))))) (continued fraction). - Paul D. Hanna, Jan 17 2006
a(n) = leftmost column term of M^n*V, where M = an infinite tridiagonal matrix with (1,2,3,...) in the super, sub, and main diagonals and the rest zeros. V = the vector [1,0,0,0,...]. - Gary W. Adamson, Jun 16 2011
E.g.f.: A(x)=1/Q(0); Q(k)=1-x/((3*k+1)-(x^2)*(3*k+1)/((x^2)-3*(3*k+2)*(k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 25 2011
a(n) ~ n! * exp(Pi/(3*sqrt(3))) * (3*sqrt(3)/(2*Pi))^(n+1). - Vaclav Kotesovec, Jul 28 2013
E.g.f.: T(0)/(1-x), where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x-x*k)*(1-2*x-x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013

Extensions

Corrected and extended by Vladeta Jovovic, Apr 14 2001

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 *)

A177523 Number of permutations of 1..n avoiding adjacent step pattern up, up, up, up.

Original entry on oeis.org

1, 1, 2, 6, 24, 119, 709, 4928, 39144, 349776, 3472811, 37928331, 451891992, 5832672456, 81074690424, 1207441809209, 19181203110129, 323753459184738, 5785975294622694, 109149016813544376, 2167402030585724571, 45190632809497874161, 987099099863360190632
Offset: 0

Views

Author

R. H. Hardin, May 10 2010

Keywords

Comments

a(n) is the number of permutations of length n that avoid the consecutive pattern 12345 (or equivalently 54321).

Examples

			E.g.f.: A(x) = 1 + x + 2*x^2/2! + 6*x^3/3! + 24*x^4/4! + 119*x^5/5! + 709*x^6/6! +...
where A(x) = 1/(1 - x + x^5/5! - x^6/6! + x^10/10! - x^11/11! + x^15/15! - x^16/16! + x^20/20! +...).
		

Crossrefs

Column k=15 of A242784.

Programs

  • Mathematica
    Table[n!*SeriesCoefficient[1/(Sum[x^(5*k)/(5*k)!-x^(5*k+1)/(5*k+1)!,{k,0,n}]),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Dec 11 2013 *)
    FullSimplify[CoefficientList[Series[10*E^((1+Sqrt[5])*x/4) / ((5+Sqrt[5]) * Cos[Sqrt[(5-Sqrt[5])/2]*x/2] + (5-Sqrt[5]) * E^(Sqrt[5]*x/2) * Cos[Sqrt[(5+Sqrt[5])/2]*x/2] - Sqrt[2*(5-Sqrt[5])] * Sin[Sqrt[(5-Sqrt[5])/2]*x/2] - Sqrt[2*(5+Sqrt[5])] * E^(Sqrt[5]*x/2) * Sin[Sqrt[(5+Sqrt[5])/2]*x/2]),{x,0,20}],x]*Range[0,20]!] (* Vaclav Kotesovec, Aug 29 2014 *)
  • PARI
    {a(n)=n!*polcoeff(1/sum(m=0, n\5+1, x^(5*m)/(5*m)!-x^(5*m+1)/(5*m+1)!+x^2*O(x^n)), n)}

Formula

E.g.f.: 1/( Sum_{n>=0} x^(5*n)/(5*n)! - x^(5*n+1)/(5*n+1)! ).
a(n)/n! ~ c * (1/r)^n, where r = 1.007187547786015395418998654... is the root of the equation Sum_{n>=0} (r^(5*n)/(5*n)! - r^(5*n+1)/(5*n+1)!) = 0, c = 1.02806793756750152.... - Vaclav Kotesovec, Dec 11 2013
Equivalently, r = 1.00718754778601539541899865400272701484... is the root of the equation (5+sqrt(5)) * cos(sqrt((5-sqrt(5))/2)*r/2) + (5-sqrt(5)) * exp(sqrt(5)*r/2) * cos(sqrt((5+sqrt(5))/2)*r/2) - sqrt(2*(5-sqrt(5))) * sin(sqrt((5-sqrt(5))/2)*r/2) - sqrt(2*(5+sqrt(5))) * exp(sqrt(5)*r/2) * sin(sqrt((5+sqrt(5))/2)*r/2) = 0. - Vaclav Kotesovec, Aug 29 2014
E.g.f.: 10*exp((1+sqrt(5))*x/4) / ((5+sqrt(5)) * cos(sqrt((5-sqrt(5))/2)*x/2) + (5-sqrt(5)) * exp(sqrt(5)*x/2) * cos(sqrt((5+sqrt(5))/2)*x/2) - sqrt(2*(5-sqrt(5))) * sin(sqrt((5-sqrt(5))/2)*x/2) - sqrt(2*(5+sqrt(5))) * exp(sqrt(5)*x/2) * sin(sqrt((5+sqrt(5))/2)*x/2)). - Vaclav Kotesovec, Aug 29 2014
In closed form, c = 5*exp((1+sqrt(5))*r/4) / (r*((5 + sqrt(5)) * cos(sqrt((5 - sqrt(5))/2)*r/2) + (5 - sqrt(5)) * exp(sqrt(5)*r/2) * cos(sqrt((5 + sqrt(5))/2)*r/2))) = 1.0280679375675015201596831656779442465978511664638... . Vaclav Kotesovec, Feb 01 2015

Extensions

More terms from Ray Chandler, Dec 06 2011
a(0)=1 prepended by Alois P. Heinz, Jan 13 2015

A117158 Number of permutations avoiding the consecutive pattern 1234.

Original entry on oeis.org

1, 1, 2, 6, 23, 111, 642, 4326, 33333, 288901, 2782082, 29471046, 340568843, 4263603891, 57482264322, 830335952166, 12793889924553, 209449977967081, 3630626729775362, 66429958806679686, 1279448352687538463, 25874432578888440471, 548178875969847203202
Offset: 0

Views

Author

Steven Finch, Apr 26 2006

Keywords

Comments

a(n) is the number of permutations on [n] that avoid the consecutive pattern 1234. It is the same as the number of permutations which avoid 4321.

References

  • F. N. David and D. E. Barton, Combinatorial Chance, Hafner, New York, 1962, pages 156-157.

Crossrefs

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<2, 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);  # Alois P. Heinz, Oct 07 2013
  • Mathematica
    a[n_]:=Coefficient[Series[2/(Cos[x]-Sin[x]+Exp[ -x]),{x,0,30}],x^n]*n!
    (* second program: *)
    b[u_, o_, t_] := b[u, o, t] = If[u+o==0, 1, If[t<2, Sum[b[u+j-1, o-j, t+1], {j, 1, o}], 0] + Sum[b[u-j, o+j-1, 0], {j, 1, u}]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 23 2015, after Alois P. Heinz *)

Formula

From Sergei N. Gladkovskii, Nov 30 2011: (Start)
E.g.f.: 2/(exp(-x) + cos(x) - sin(x)) = 1/W(0) with continued fraction
W(k) = 1 + (x^(2*k))/(f + f*x/(4*k + 1 - x - (4*k + 1)*b/R)), where R := x^(2*k) + b -(x^(4*k+1))/(c + (x^(2*k+1)) + x*c/T); T := 4*k + 3 - x - (4*k + 3)*d/(d +(x^(2*k+1))/W(k+1)), and
f := (4*k)!/(2*k)!; b := (4*k + 1)!/(2*k + 1)!; c := (4*k + 2)!/(2*k + 1)!; and d :=(4*k + 3)!/(2*k + 2)!. (End)
a(n) ~ n! / (sin(r)*r^(n+1)), where r = 1.0384156372665563... is the root of the equation exp(-r) + cos(r) = sin(r). - Vaclav Kotesovec, Dec 11 2013

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

A177553 Number of permutations of 1..n avoiding adjacent step pattern up, up, up, up, up, up.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 720, 5039, 40305, 362682, 3626190, 39881160, 478490760, 6219298800, 87055051511, 1305598835941, 20885951018102, 354999461960226, 6388879812001704, 121367620532150280, 2426930566055020080, 50956684690331669759, 1120852238721212726609
Offset: 0

Views

Author

R. H. Hardin, May 10 2010

Keywords

Crossrefs

Column k=63 of A242784.

Programs

  • Maple
    b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
          `if`(t<5, 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);  # Alois P. Heinz, Oct 07 2013
  • Mathematica
    nn=20;r=6;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 *)
    Table[n!*SeriesCoefficient[1/(Sum[x^(7*k)/(7*k)!-x^(7*k+1)/(7*k+1)!,{k,0,n}]),{x,0,n}],{n,1,20}] (* Vaclav Kotesovec, Aug 29 2014 *)

Formula

a(n)/n! ~ c * (1/r)^n, where r = 1.0001738181531504504518260962714687775785823593018886... is the root of the equation Sum_{n>=0} (r^(7*n)/(7*n)! - r^(7*n+1)/(7*n+1)!) = 0, c = 1.0010191104259450282450770594076722424772755532278.... - Vaclav Kotesovec, Aug 29 2014
E.g.f.: -(7/(2*((-cos(x*cos(3*Pi/14)))*cosh(x*sin(3*Pi/14)) + cos(x*cos(3*Pi/14))*cosh(x*sin(3*Pi/14))* sin(3*Pi/14) - cosh(x*sin(Pi/14))* (cos(x*cos(Pi/14))*(1 + sin(Pi/14)) - cos(Pi/14)*sin(x*cos(Pi/14))) + cos(3*Pi/14)*cosh(x*sin(3*Pi/14))* sin(x*cos(3*Pi/14)) - cosh(x*cos(Pi/7))* ((1 + cos(Pi/7))*cos(x*sin(Pi/7)) - sin(Pi/7)*sin(x*sin(Pi/7))) + cos(x*sin(Pi/7))* sinh(x*cos(Pi/7)) + cos(Pi/7)*cos(x*sin(Pi/7))* sinh(x*cos(Pi/7)) - sin(Pi/7)*sin(x*sin(Pi/7))* sinh(x*cos(Pi/7)) + cos(x*cos(Pi/14))* sinh(x*sin(Pi/14)) + cos(x*cos(Pi/14))*sin(Pi/14)* sinh(x*sin(Pi/14)) - cos(Pi/14)*sin(x*cos(Pi/14))* sinh(x*sin(Pi/14)) - cos(x*cos(3*Pi/14))* sinh(x*sin(3*Pi/14)) + cos(x*cos(3*Pi/14))* sin(3*Pi/14)*sinh(x*sin(3*Pi/14)) + cos(3*Pi/14)*sin(x*cos(3*Pi/14))* sinh(x*sin(3*Pi/14))))). - Vaclav Kotesovec, Jan 31 2015
In closed form, c = 7 / (r * (2*cos(r*sin(Pi/7))*cosh(r*cos(Pi/7)) + cos(Pi/7 - r*sin(Pi/7)) * cosh(r*cos(Pi/7)) + cos(Pi/7 - r*sin(Pi/7)) * cosh(r*cos(Pi/7)) + 2*cos(r*cos(Pi/14)) * cosh(r*sin(Pi/14)) + 2*cos(r*cos(3*Pi/14)) * cosh(r*sin(3*Pi/14)) + 2*cosh(r*sin(Pi/14)) * sin(Pi/14 + r*cos(Pi/14)) - 2*cosh(r*sin(3*Pi/14)) * sin(3*Pi/14 - r*cos(3*Pi/14)) - 2*cos(r*sin(Pi/7)) * sinh(r*cos(Pi/7)) - cos(Pi/7 - r*sin(Pi/7)) * sinh(r*cos(Pi/7)) - cos(Pi/7 - r*sin(Pi/7)) * sinh(r*cos(Pi/7)) - 2*cos(r*cos(Pi/14)) * sinh(r*sin(Pi/14)) - 2*sin(Pi/14 + r*cos(Pi/14))*sinh(r*sin(Pi/14)) + 2*cos(r*cos(3*Pi/14)) * sinh(r*sin(3*Pi/14)) - 2*sin((3*Pi)/14 - r*cos(3*Pi/14)) * sinh(r*sin(3*Pi/14)))). - Vaclav Kotesovec, Feb 01 2015

Extensions

a(18)-a(22) from Alois P. Heinz, Oct 07 2013
a(0)=1 prepended by Alois P. Heinz, Aug 08 2018

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

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