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 11 results. Next

A003436 Number of inequivalent labeled Hamiltonian circuits on n-octahedron. Interlacing chords joining 2n points on circle.

Original entry on oeis.org

1, 0, 1, 4, 31, 293, 3326, 44189, 673471, 11588884, 222304897, 4704612119, 108897613826, 2737023412199, 74236203425281, 2161288643251828, 67228358271588991, 2225173863019549229, 78087247031912850686, 2896042595237791161749, 113184512236563589997407
Offset: 0

Views

Author

Keywords

Comments

Also called the relaxed ménage problem (cf. A000179).
a(n) can be seen as a subset of the unordered pairings of the first 2n integers (A001147) with forbidden pairs (1,2n) and (i,i+1) for all i in [1,2n-1] (all adjacent integers modulo 2n). The linear version of this constraint is A000806. - Olivier Gérard, Feb 08 2011
Number of perfect matchings in the complement of C_{2n} where C_{2n} is the cycle graph on 2n vertices. - Andrew Howroyd, Mar 15 2016
Also the number of 2-uniform set partitions of {1...2n} containing no two cyclically successive vertices in the same block. - Gus Wiseman, Feb 27 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003435, A129348. A003437 gives unlabeled case.
First differences of A000806.
Column k=2 of A324428.

Programs

  • Maple
    A003436 := proc(n) local k;
          if n = 0 then 1
        elif n = 1 then 0
        else add( (-1)^k*binomial(n,k)*2*n/(2*n-k)*2^k*(2*n-k)!/2^n/n!,k=0..n) ;
        end if;
    end proc: # R. J. Mathar, Dec 11 2013
    A003436 := n-> `if`(n<2, 1-n, (-1)^n*2*hypergeom([n, -n], [], 1/2)):
    seq(simplify(A003436(n)), n=0..18); # Peter Luschny, Nov 10 2016
  • Mathematica
    a[n_] := (2*n-1)!! * Hypergeometric1F1[-n, 1-2*n, -2]; a[1] = 0;
    Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Apr 05 2013 *)
    twounifll[{}]:={{}};twounifll[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twounifll[Complement[set,s]]]/@Table[{i,j},{j,If[i==1,Select[set,2<#i+1&]]}];
    Table[Length[twounifll[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)

Formula

a(n) = A003435(n)/(n!*2^n).
a(n) = 2*n*a(n-1)-2*(n-3)*a(n-2)-a(n-3) for n>4. [Corrected by Vasu Tewari, Apr 11 2010, and by R. J. Mathar, Oct 02 2013]
G.f.: x + ((1-x)/(1+x)) * Sum_{n>=0} A001147(n)*(x/(1+x)^2)^n. - Vladeta Jovovic, Jun 27 2007
a(n) ~ 2^(n+1/2)*n^n/exp(n+1). - Vaclav Kotesovec, Aug 13 2013
a(n) = (-1)^n*2*hypergeom([n, -n], [], 1/2) for n >= 2. - Peter Luschny, Nov 10 2016

Extensions

a(0)=1 prepended by Gus Wiseman, Feb 27 2019

A278990 Number of loopless linear chord diagrams with n chords.

Original entry on oeis.org

1, 0, 1, 5, 36, 329, 3655, 47844, 721315, 12310199, 234615096, 4939227215, 113836841041, 2850860253240, 77087063678521, 2238375706930349, 69466733978519340, 2294640596998068569, 80381887628910919255, 2976424482866702081004, 116160936719430292078411
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2016

Keywords

Comments

See the signed version of these numbers, A000806, for much more information about these numbers.
From Gus Wiseman, Feb 27 2019: (Start)
Also the number of 2-uniform set partitions of {1..2n} containing no two successive vertices in the same block. For example, the a(3) = 5 set partitions are:
{{1,3},{2,5},{4,6}}
{{1,4},{2,5},{3,6}}
{{1,4},{2,6},{3,5}}
{{1,5},{2,4},{3,6}}
{{1,6},{2,4},{3,5}}
(End)
From Gus Wiseman, Jul 05 2020: (Start)
Also the number of permutations of the multiset {1,1,2,2,...,n,n} with no two consecutive terms equal and where the first i appears before the first j for i < j. For example, the a(3) = 5 permutations are the following.
(1,2,3,1,2,3)
(1,2,3,1,3,2)
(1,2,3,2,1,3)
(1,2,3,2,3,1)
(1,2,1,3,2,3)
(End)

Crossrefs

Column k=0 of A079267.
Column k=2 of A293157.
Row n=2 of A322013.
Cf. A000110, A000699 (topologically connected 2-uniform), A000806, A001147 (2-uniform), A003436 (cyclical version), A005493, A170941, A190823 (distance 3+ version), A322402, A324011, A324172.
Anti-run compositions are A003242.
Separable partitions are A325534.
Other sequences involving the multiset {1,1,2,2,...,n,n}: A001147, A007717, A020555, A094574, A316972.

Programs

  • Magma
    [n le 2 select 2-n else (2*n-3)*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Sep 26 2023
    
  • Mathematica
    RecurrenceTable[{a[n]== (2n-1)a[n-1] +a[n-2], a[0]==1, a[1]==0}, a, {n,0,20}] (* Vaclav Kotesovec, Sep 15 2017 *)
    FullSimplify[Table[-I*(BesselI[1/2+n,-1] BesselK[3/2,1] - BesselI[3/2,-1] BesselK[1/2+ n,1]), {n,0,20}]] (* Vaclav Kotesovec, Sep 15 2017 *)
    Table[(2 n-1)!! Hypergeometric1F1[-n,-2 n,-2], {n,0,20}] (* Eric W. Weisstein, Nov 14 2018 *)
    Table[Sqrt[2/Pi]/E ((-1)^n Pi BesselI[1/2+n,1] +BesselK[1/2+n,1]), {n,0,20}] // FunctionExpand // FullSimplify (* Eric W. Weisstein, Nov 14 2018 *)
    twouniflin[{}]:={{}};twouniflin[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@twouniflin[Complement[set,s]]]/@Table[{i,j},{j,Select[set,#>i+1&]}];
    Table[Length[twouniflin[Range[n]]],{n,0,14,2}] (* Gus Wiseman, Feb 27 2019 *)
  • PARI
    seq(N) = {
      my(a = vector(N)); a[1] = 0; a[2] = 1;
      for (n = 3, N, a[n] = (2*n-1)*a[n-1] + a[n-2]);
      concat(1, a);
    };
    seq(20) \\ Gheorghe Coserea, Dec 09 2016
    
  • SageMath
    def A278990_list(prec):
        P. = PowerSeriesRing(QQ, prec)
        return P( exp(-1+sqrt(1-2*x))/sqrt(1-2*x) ).egf_to_ogf().list()
    A278990_list(30) # G. C. Greubel, Sep 26 2023

Formula

From Gheorghe Coserea, Dec 09 2016: (Start)
D-finite with recurrence a(n) = (2*n-1)*a(n-1) + a(n-2), with a(0) = 1, a(1) = 0.
E.g.f. y satisfies: 0 = (1-2*x)*y'' - 3*y' - y.
a(n) - a(n-1) = A003436(n) for all n >= 2. (End)
From Vaclav Kotesovec, Sep 15 2017: (Start)
a(n) = sqrt(2)*exp(-1)*(BesselK(1/2 + n, 1)/sqrt(Pi) - i*sqrt(Pi)*BesselI(1/2 + n, -1)), where i is the imaginary unit.
a(n) ~ 2^(n+1/2) * n^n / exp(n+1). (End)
a(n) = A114938(n)/n! - Gus Wiseman, Jul 05 2020 (from Alexander Burstein's formula at A114938).
From G. C. Greubel, Sep 26 2023: (Start)
a(n) = (-1)^n * (i/e)*Sqrt(2/Pi) * BesselK(n + 1/2, -1).
G.f.: sqrt(Pi/(2*x)) * exp(-(1+x)^2/(2*x)) * Erfi((1+x)/sqrt(2*x)).
E.g.f.: exp(-1 + sqrt(1-2*x))/sqrt(1-2*x). (End)

Extensions

a(0)=1 prepended by Gheorghe Coserea, Dec 09 2016

A190823 Number of permutations of 2 copies of 1..n introduced in order 1..n with no element equal to another within a distance of 2.

Original entry on oeis.org

1, 0, 0, 1, 10, 99, 1146, 15422, 237135, 4106680, 79154927, 1681383864, 39034539488, 983466451011, 26728184505750, 779476074425297, 24281301468714902, 804688068731837874, 28269541494090294129, 1049450257149017422000, 41050171013933837206545
Offset: 0

Views

Author

R. H. Hardin, May 21 2011

Keywords

Comments

From Gus Wiseman, Feb 27 2019: (Start)
Also the number of 2-uniform set partitions of {1..2n} such that no block has its two vertices differing by less than 3. For example, the a(4) = 10 set partitions are:
{{1,4}, {2,6}, {3,7}, {5,8}}
{{1,4}, {2,7}, {3,6}, {5,8}}
{{1,5}, {2,6}, {3,7}, {4,8}}
{{1,5}, {2,6}, {3,8}, {4,7}}
{{1,5}, {2,7}, {3,6}, {4,8}}
{{1,5}, {2,8}, {3,6}, {4,7}}
{{1,6}, {2,5}, {3,7}, {4,8}}
{{1,6}, {2,5}, {3,8}, {4,7}}
{{1,7}, {2,5}, {3,6}, {4,8}}
{{1,8}, {2,5}, {3,6}, {4,7}}
(End)

Examples

			All solutions for n=4 (read downwards):
  1    1    1    1    1    1    1    1    1    1
  2    2    2    2    2    2    2    2    2    2
  3    3    3    3    3    3    3    3    3    3
  4    4    4    4    1    4    4    1    4    4
  1    1    2    1    4    2    1    4    2    2
  3    3    1    2    2    3    2    3    1    3
  2    4    4    4    3    4    3    2    3    1
  4    2    3    3    4    1    4    4    4    4
		

Crossrefs

Distance of 1 instead of 2 gives |A000806|.
Column k=3 of A293157.
Cf. A000699, A001147 (2-uniform set partitions), A003436, A005493, A011968, A170941, A278990 (distance 2+ version), A306386 (cyclical version).

Programs

  • Magma
    I:=[1,0,0,1,10,99]; [n le 5 select I[n] else 2*n*Self(n-1) -2*(3*n-8)*Self(n-2) +2*(3*n-11)*Self(n-3) -2*(n-5)*Self(n-4) -Self(n-5): n in [1..40]]; // G. C. Greubel, Dec 03 2023
    
  • Mathematica
    a[0]=1; a[1]=0; a[2]=0; a[3]=1; a[4]=10; a[5]=99; a[n_] := a[n] = (2*n+2) a[n-1] - (6*n-10) a[n-2] + (6*n-16) a[n-3] - (2*n-8) a[n-4] - a[n-5]; Array[a, 20, 0] (* based on Sullivan's formula, Giovanni Resta, Mar 20 2017 *)
    dtui[{}]:={{}};dtui[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@dtui[Complement[set,s]]]/@Table[{i,j},{j,Select[set,#>i+2&]}];
    Table[Length[dtui[Range[n]]],{n,0,12,2}] (* Gus Wiseman, Feb 27 2019 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A190823
        if (n<6): return (1,0,0,1,10,99)[n]
        else: return 2*(n+1)*a(n-1) - 2*(3*n-5)*a(n-2) + 2*(3*n-8)*a(n-3) - 2*(n-4)*a(n-4) - a(n-5)
    [a(n) for n in range(41)] # G. C. Greubel, Dec 03 2023

Formula

a(n) = 2*(n+1)*a(n-1) - 2*(3*n-5)*a(n-2) + 2*(3*n-8)*a(n-3) - 2*(n-4)*a(n-4) - a(n-5) (proved). - Everett Sullivan, Mar 16 2017
a(n) ~ 2^(n+1/2) * n^n / exp(n+2), based on Sullivan's formula. - Vaclav Kotesovec, Mar 21 2017

Extensions

a(16)-a(20) (using Everett Sullivan's formula) from Giovanni Resta, Mar 20 2017
a(0)=1 prepended by Alois P. Heinz, Oct 17 2017

A306386 Number of chord diagrams with n chords all having arc length at least 3.

Original entry on oeis.org

1, 0, 0, 1, 7, 68, 837, 11863, 189503, 3377341, 66564396, 1439304777, 33902511983, 864514417843, 23735220814661, 698226455579492, 21914096529153695, 731009183350476805, 25829581529376423945, 963786767538027630275, 37871891147795243899204, 1563295398737378236910447
Offset: 0

Views

Author

Gus Wiseman, Feb 26 2019

Keywords

Comments

A cyclical form of A190823.
Also the number of 2-uniform set partitions of {1...2n} such that, when the vertices are arranged uniformly around a circle, no block has its two vertices separated by an arc length of less than 3.

Examples

			The a(8) = 7 2-uniform set partitions with all arc lengths at least 3:
  {{1,4},{2,6},{3,7},{5,8}}
  {{1,4},{2,7},{3,6},{5,8}}
  {{1,5},{2,6},{3,7},{4,8}}
  {{1,5},{2,6},{3,8},{4,7}}
  {{1,5},{2,7},{3,6},{4,8}}
  {{1,6},{2,5},{3,7},{4,8}}
  {{1,6},{2,5},{3,8},{4,7}}
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<8, [1, 0$2, 1, 7, 68, 837, 11863][n+1],
          ((8*n^4-64*n^3+142*n^2-66*n+109)    *a(n-1)
          -(24*n^4-248*n^3+870*n^2-1106*n+241)*a(n-2)
          +(24*n^4-264*n^3+982*n^2-1270*n+145)*a(n-3)
          -(8*n^4-96*n^3+374*n^2-486*n+33)    *a(n-4)
          -(4*n^3-24*n^2+39*n-2)              *a(n-5))/(4*n^3-36*n^2+99*n-69))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, Feb 27 2019
  • Mathematica
    dtui[{},]:={{}};dtui[set:{i,___},n_]:=Join@@Function[s,Prepend[#,s]&/@dtui[Complement[set,s],n]]/@Table[{i,j},{j,Switch[i,1,Select[set,3<#i+2&]]}];
    Table[Length[dtui[Range[n],n]],{n,0,12,2}]

Formula

a(n) is even <=> n in { A135042 }. - Alois P. Heinz, Feb 27 2019

Extensions

a(10)-a(16) from Alois P. Heinz, Feb 26 2019
a(17)-a(21) from Alois P. Heinz, Feb 27 2019

A239145 Number T(n,k) of self-inverse permutations p on [n] where the minimal transposition distance equals k (k=0 for the identity permutation); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 5, 3, 1, 0, 1, 13, 8, 3, 1, 0, 1, 39, 22, 10, 3, 1, 0, 1, 120, 65, 32, 10, 3, 1, 0, 1, 401, 208, 103, 37, 10, 3, 1, 0, 1, 1385, 703, 344, 136, 37, 10, 3, 1, 0, 1, 5069, 2517, 1206, 501, 151, 37, 10, 3, 1, 0, 1, 19170, 9390, 4421, 1890, 622, 151, 37, 10, 3, 1, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 11 2014

Keywords

Comments

Columns k=0 and k=1 respectively give A000012 and A000085(n)-A170941(n).
Row sums give A000085.
Diagonal T(2n,n) gives A005493(n-1) for n>0.
Reversed rows converge to A005493.

Examples

			T(4,0) = 1: 1234.
T(4,1) = 5: 1243, 1324, 2134, 2143, 4321.
T(4,2) = 3: 1432, 3214, 3412.
T(4,3) = 1: 4231.
Triangle T(n,k) begins:
00:   1;
01:   1,    0;
02:   1,    1,    0;
03:   1,    2,    1,    0;
04:   1,    5,    3,    1,   0;
05:   1,   13,    8,    3,   1,   0;
06:   1,   39,   22,   10,   3,   1,  0;
07:   1,  120,   65,   32,  10,   3,  1,  0;
08:   1,  401,  208,  103,  37,  10,  3,  1, 0;
09:   1, 1385,  703,  344, 136,  37, 10,  3, 1, 0;
10:   1, 5069, 2517, 1206, 501, 151, 37, 10, 3, 1, 0;
		

Programs

  • Maple
    b:= proc(n, k, s) option remember; `if`(n=0, 1, `if`(n in s,
          b(n-1, k, s minus {n}), b(n-1, k, s) +add(`if`(i in s, 0,
          b(n-1, k, s union {i})), i=1..n-k-1)))
        end:
    T:= (n, k)-> `if`(k=0, 1, b(n, k-1, {})-b(n, k, {})):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, k_, s_List] := b[n, k, s] = If[n == 0, 1, If[MemberQ[s, n], b[n-1, k, s ~Complement~ {n}], b[n-1, k, s] + Sum[If[MemberQ[s, i], 0, b[n-1, k, s ~Union~ {i}]], {i, 1, n - k - 1}]]] ; T[n_, k_] := If[k == 0, 1, b[n, k-1, {}] - b[n, k, {}]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 22 2015, after Maple *)

Formula

T(n,k) = A239144(n,k-1) - A239144(n,k) for k>0, T(n,0) = 1.

A239144 Number T(n,k) of self-inverse permutations p on [n] such that all transposition distances (if any) are larger than k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 10, 5, 2, 1, 1, 26, 13, 5, 2, 1, 1, 76, 37, 15, 5, 2, 1, 1, 232, 112, 47, 15, 5, 2, 1, 1, 764, 363, 155, 52, 15, 5, 2, 1, 1, 2620, 1235, 532, 188, 52, 15, 5, 2, 1, 1, 9496, 4427, 1910, 704, 203, 52, 15, 5, 2, 1, 1
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Mar 11 2014

Keywords

Comments

T(n,k) is defined for all n, k >= 0: T(n,k) = 1 for k >= n.
Columns k=0 and k=1 respectively give A000085 and A170941 (involutions on [n] without adjacent transpositions).
Diagonal T(2n,n) gives A000110(n).

Examples

			T(4,0) = 10: 1234, 1243, 1324, 1432, 2134, 2143, 3214, 3412, 4231, 4321.
T(4,1) = 5: 1234, 1432, 3214, 3412, 4231.
T(4,2) = 2: 1234, 4231.
T(4,3) = 1: 1234.
Triangle T(n,k) begins:
00:      1;
01:      1,    1;
02:      2,    1,    1;
03:      4,    2,    1,   1;
04:     10,    5,    2,   1,   1;
05:     26,   13,    5,   2,   1,  1;
06:     76,   37,   15,   5,   2,  1,  1;
07:    232,  112,   47,  15,   5,  2,  1, 1;
08:    764,  363,  155,  52,  15,  5,  2, 1, 1;
09:   2620, 1235,  532, 188,  52, 15,  5, 2, 1, 1;
10:   9496, 4427, 1910, 704, 203, 52, 15, 5, 2, 1, 1;
		

Crossrefs

Cf. A239145.

Programs

  • Maple
    b:= proc(n, k, s) option remember; `if`(n=0, 1, `if`(n in s,
          b(n-1, k, s minus {n}), b(n-1, k, s) +add(`if`(i in s, 0,
          b(n-1, k, s union {i})), i=1..n-k-1)))
        end:
    T:= (n, k)-> b(n, k, {}):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, k_, s_List] := b[n, k, s] = If[n == 0, 1, If[MemberQ[s, n], b[n-1, k, s ~Complement~ {n}], b[n-1, k, s] + Sum[If[MemberQ[s, i], 0, b[n-1, k, s ~Union~ {i}]], {i, 1, n-k-1}]]]; T[n_, k_] := b[n, k, {}]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jan 19 2015, after Alois P. Heinz *)

A306419 Number of set partitions of {1, ..., n} whose blocks are all singletons and pairs, not including {1, n} or {i, i + 1} for any i.

Original entry on oeis.org

1, 1, 1, 1, 4, 11, 32, 99, 326, 1123, 4064, 15291, 59924, 242945, 1019584, 4409233, 19648674, 89938705, 422744384, 2035739041, 10039057524, 50610247483, 260704414816, 1370387233859, 7346982653702, 40131663286851, 223238920709024, 1263531826402891, 7273434344119460
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

Also the number of spanning subgraphs of the complement of an n-cycle, with no overlapping edges.
I.e., for n >= 3, also the number of matchings in the complement of the cycle graph C_n. - Eric W. Weisstein, Sep 02 2025

Examples

			The a(1) = 1 through a(5) = 11 set partitions:
  {{1}}  {{1}{2}}  {{1}{2}{3}}  {{13}{24}}      {{1}{24}{35}}
                                {{1}{24}{3}}    {{13}{24}{5}}
                                {{13}{2}{4}}    {{13}{25}{4}}
                                {{1}{2}{3}{4}}  {{14}{2}{35}}
                                                {{14}{25}{3}}
                                                {{1}{2}{35}{4}}
                                                {{1}{24}{3}{5}}
                                                {{1}{25}{3}{4}}
                                                {{13}{2}{4}{5}}
                                                {{14}{2}{3}{5}}
                                                {{1}{2}{3}{4}{5}}
		

Crossrefs

Cf. A000085, A000110, A000296, A001006, A001610, A003436 (no singletons), A034807, A170941 (linear case), A278990 (linear case with no singletons), A306417.

Programs

  • Mathematica
    stableSets[u_,Q_]:=If[Length[u]===0,{{}},With[{w=First[u]},Join[stableSets[DeleteCases[u,w],Q],Prepend[#,w]&/@stableSets[DeleteCases[u,r_/;r===w||Q[r,w]||Q[w,r]],Q]]]];
    Table[Length[stableSets[Complement[Subsets[Range[n],{2}],Sort/@Partition[Range[n],2,1,1]],Intersection[#1,#2]!={}&]],{n,0,10}]
    (* Second program: *)
    CompoundExpression[
      b[n_] := I^(1 - n) 2^((n - 1)/2) HypergeometricU[(1 - n)/2, 3/2, -1/2],
      Join[{1, 1, 1}, Table[Sum[(-1)^k b[n - 2 k] n (n - 1 - k)!/(k! (n - 2 k)!), {k, 0, n/2}], {n, 3, 20}]]
    ] (* Eric W. Weisstein, Sep 02 2025 *)
  • PARI
    \\ here b(n) is A000085(n)
    b(n) = {sum(k=0, n\2, n!/((n-2*k)!*2^k*k!))}
    a(n) = {if(n < 3, n >= 0, sum(k=0, n\2, (-1)^k*b(n-2*k)*n*(n-1-k)!/(k!*(n-2*k)!)))} \\ Andrew Howroyd, Aug 30 2019

Formula

a(n) = Sum_{k=0..floor(n/2)} (-1)^k*A034807(n, k)*A000085(n-2*k) for n > 2. - Andrew Howroyd, Aug 30 2019

Extensions

Terms a(16) and beyond from Andrew Howroyd, Aug 30 2019

A217876 Triangle read by rows: distribution of adjacent transpositions in involutions.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 5, 4, 1, 13, 10, 3, 37, 29, 9, 1, 112, 88, 28, 4, 363, 288, 96, 16, 1, 1235, 984, 336, 60, 5, 4427, 3555, 1248, 240, 25, 1, 16526, 13334, 4764, 956, 110, 6, 64351, 52252, 19023, 3984, 505, 36, 1, 259471, 211646, 78101, 16836, 2261, 182, 7
Offset: 0

Views

Author

David Callan, Oct 14 2012

Keywords

Comments

T(n,k) is the number of involutions on [n] containing exactly k adjacent transpositions. The Mathematica recurrence below is based on considerations and manipulations similar to those in the Stadler and Haslinger reference for the case k=0 (Theorem 5 in Section 3).
It appears that each column is a palindromic linear combination of the entries a[n] := T(n,0) in column 0:
T(n,1) = a[n] - a[n-1] + a[n-2],
T(n,2) = (a[n] - 2 a[n-1] + 2 a[n-2] - 2 a[n-3] + a[n-4])/2,
T(n,3) = (a[n] - 3 a[n-1] + 3 a[n-2] - 4 a[n-3] + 3 a[n-4] - 3 a[n-5] + a[n-6])/6,
T(n,4) = (a[n] - 4 a[n - 1] + 4 a[n - 2] - 4 a[n - 3] + 4 a[n - 4] - 4 a[n - 5] + 4 a[n - 6] - 4 a[n - 7] + a[n - 8])/24,
T(n,5) = (a[n] - 5 a[n - 1] + 5 a[n - 2] + 4 a[n - 5] + 5 a[n - 8] - 5 a[n - 9] + a[n - 10])/120.
It appears that each diagonal is a polynomial function: topmost entries are 1, second entries are k+1, third entries are (k+1)^2, fourth entries are 1/3 (1 + k) (2 + k) (3 + 2 k), fifth entries are 1/12 (1 + k) (2 + k) (30 + 23 k + 5 k^2), sixth entries are 1/60 (1 + k) (2 + k) (3 + k) (130 + 77 k + 13 k^2), seventh entries are 1/180 (1 + k) (2 + k) (3 + k) (1110 + 821 k + 210 k^2 + 19 k^3).
Conjecture: The asymptotic distribution of adjacent transpositions in involutions is Poisson with mean 1.

Examples

			Triangle starts at n=0, k=0:
..1
..1
..1 ...1
..2 ...2
..5 ...4 ...1
.13 ..10 ...3
.37 ..29 ...9 ...1
112 ..88 ..28 ...4
363 .288 ..96 ..16 ...1
T(5,2) = 3 counts, in cycle form, {(12),(34),(5)}, {(12),(3),(45)}, and {(1),(23),(45)} because each contains 2 adjacent transpositions.
		

References

  • P. Stadler and C. Haslinger, RNA structures with pseudo-knots: Graph theoretical and combinatorial properties, Bull. Math. Biol. (1999) Vol 61 Issue 3, 437-67.

Crossrefs

Column k=0 is A170941. Row sums are A000085.

Programs

  • Maple
    b:= proc(n, s) option remember; `if`(n=0, 1, `if`(n in s,
          b(n-1, s minus {n}), expand(b(n-1, s)+add(`if`(i in s, 0,
          `if`(i=n-1, x, 1)*b(n-1, s union {i})), i=1..n-1))))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, {})):
    seq(T(n), n=0..14);  # Alois P. Heinz, Mar 10 2014
  • Mathematica
    Clear[T]; (* T(n,k,j) is the number of involutions on [n] containing k adjacent transpositions but not the adjacent transposition (j,j+1) *)
    T[n_, k_] /; k < 0  || k > n/2 := 0;
    T[0, 0] = 1; T[1, 0] = 1; T[2, 0] = 1;
    T[n_, k_] := T[n, k] = T[n - 1, k] + T[n - 2, k - 1] - T[n - 3, k] - T[n - 4, k - 1] + T[n - 4, k] + Sum[T[n - 2, k, j], {j, 0, n - 2}];
    T[n_, k_, j_] /; n <= 1 && k >= 1 := 0;
    T[n_, k_, j_] /; k < 0 := 0;
    T[n_, k_, j_] /; 0 <= n <= 1 && k == 0 := 1;
    T[n_, k_, j_] /; j <= 0 || j >= n := T[n, k];
    T[n_, k_, j_] /; n >= 2 && k >= 0 := T[n, k, j] = T[n - 2, k, j - 1] + T[n, k] - T[n - 2, k] - T[n - 2, k - 1, j - 1];
    Table[T[n, k], {n, 0, 15}, {k, 0, n/2}]

A302719 Number of edge covers in the n-path complement graph.

Original entry on oeis.org

0, 0, 0, 2, 26, 580, 23116, 1703182, 237842582, 64143512608, 33852316389688, 35268292090882874, 72930742736413804146, 300323342846133370497564, 2467442527810798875863471748, 40490661363717159406441954638982, 1327931037076594186049396631983031214
Offset: 1

Views

Author

Eric W. Weisstein, Apr 12 2018

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[Binomial[n - i, k] Sum[(-1)^(k - j) Binomial[k, j] 2^Binomial[j, 2], {j, 0, k}] (2^i)^k If[i == 0 && k == n, 1, (2^i - 1)^(n - i - k)], {k, 0, n - i}] Sum[(-1)^j Binomial[n - j, i - j] Binomial[j - 1, 2 j - i] 2^(Binomial[i, 2] - j), {j, Ceiling[i/2], i}], {i, 0, n}], {n, 10}] (* Eric W. Weisstein, Apr 24 2018 *)
  • PARI
    a(n)={ my(p=serlaplace(sum(k=0, n, 2^binomial(k,2)*x^k/k!)/exp(x+O(x*x^n))));
    sum(i=0, n, sum(k=0, n-i, binomial(n-i,k)*polcoeff(p,k)*(2^i)^k*(2^i-1)^(n-i-k)) * sum(j=(i+1)\2, i, (-1)^j * binomial(n-j, i-j) * binomial(j-1, 2*j-i) * 2^binomial(i,2)/2^j))} \\ Andrew Howroyd, Apr 23 2018

Formula

a(n) = Sum_{i=0..n} (Sum_{k=0..n-i} binomial(n-i, k)*A006129(k)*(2^i)^k*(2^i-1)^(n-i-k)) * (Sum_{j=ceiling(i/2)..i} (-1)^j*binomial(n-j, i-j)*binomial(j-1, 2*j-i)*2^binomial(i, 2)/2^j). - Andrew Howroyd, Apr 23 2018

Extensions

Terms a(10) and beyond from Andrew Howroyd, Apr 23 2018

A302749 Number of maximal matchings in the n-path complement graph.

Original entry on oeis.org

1, 1, 1, 2, 6, 11, 41, 77, 365, 694, 3984, 7639, 51499, 99343, 769159, 1490474, 13031514, 25341713, 246925295, 481540391, 5173842311, 10113069526, 118776068256, 232612909297, 2964697094281, 5815557347521, 79937923931761, 157024987610282, 2315462770608870, 4553838477539219
Offset: 1

Views

Author

Eric W. Weisstein, Apr 12 2018

Keywords

Crossrefs

Cf. A170941 (matchings), A302750 (maximum matchings).

Programs

  • Mathematica
    Table[If[Mod[n, 2] == 0, (n - 1)!! (Hypergeometric1F1[1 - n/2, 1 - n, -2] + Hypergeometric1F1[-n/2, -n, -2]), (2^-Floor[n/2] n! Hypergeometric1F1[-Floor[n/2], -n, -2])/Floor[n/2]!], {n, 30}]
  • PARI
    b(n)=(2*n)!/(2^n*n!);
    a(n)=sum(k=0, n\2, if(n%2,1,(1-k))*(-1)^k*binomial(n-k,k)*b((n+1)\2-k)) \\ Andrew Howroyd, Apr 15 2018

Formula

a(2n+1) = A302750(2n+1), a(2n) = Sum_{k=0..n} (1-k)*(-1)^k*binomial(2*n-k,k)*(2*(n-k)-1)!!. - Andrew Howroyd, Apr 15 2018

Extensions

a(17)-a(30) from Andrew Howroyd, Apr 15 2018
Showing 1-10 of 11 results. Next