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.

Previous Showing 21-30 of 52 results. Next

A323950 Number of ways to split an n-cycle into connected subgraphs, none having exactly two vertices.

Original entry on oeis.org

1, 1, 1, 2, 6, 12, 23, 44, 82, 149, 267, 475, 841, 1484, 2613, 4595, 8074, 14180, 24896, 43702, 76705, 134622, 236260, 414623, 727629, 1276917, 2240851, 3932438, 6900967, 12110373, 21252244, 37295110, 65448378, 114853920, 201554603, 353703696, 620706742
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			The a(1) = 1 through a(5) = 12 partitions:
  {{1}}  {{1}{2}}  {{123}}      {{1234}}        {{12345}}
                   {{1}{2}{3}}  {{1}{234}}      {{1}{2345}}
                                {{123}{4}}      {{1234}{5}}
                                {{124}{3}}      {{1235}{4}}
                                {{134}{2}}      {{1245}{3}}
                                {{1}{2}{3}{4}}  {{1345}{2}}
                                                {{1}{2}{345}}
                                                {{1}{234}{5}}
                                                {{123}{4}{5}}
                                                {{125}{3}{4}}
                                                {{145}{2}{3}}
                                                {{1}{2}{3}{4}{5}}
		

Crossrefs

Programs

  • Mathematica
    cyceds[n_,k_]:=Union[Sort/@Join@@Table[1+Mod[Range[i,j]-1,n],{i,n},{j,Prepend[Range[i+k,n+i-1],i]}]];
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[cyceds[n,2],Range[n]]],{n,15}]

Formula

G.f.: (x^7-3*x^6+3*x^5-2*x^4+x^3-3*x^2+3*x-1)/((x^3-x^2+2*x-1)*(x-1)^2). - Alois P. Heinz, Feb 10 2019

Extensions

More terms from Alois P. Heinz, Feb 10 2019

A323954 Regular triangle read by rows where T(n, k) is the number of ways to split an n-cycle into connected subsequences of sizes > k, n >=1, 0 <= k < n.

Original entry on oeis.org

1, 2, 1, 5, 1, 1, 12, 3, 1, 1, 27, 6, 1, 1, 1, 58, 12, 4, 1, 1, 1, 121, 22, 8, 1, 1, 1, 1, 248, 39, 13, 5, 1, 1, 1, 1, 503, 67, 22, 10, 1, 1, 1, 1, 1, 1014, 113, 36, 16, 6, 1, 1, 1, 1, 1, 2037, 188, 56, 23, 12, 1, 1, 1, 1, 1, 1, 4084, 310, 86, 35, 19, 7, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			Triangle begins:
     1
     2    1
     5    1    1
    12    3    1    1
    27    6    1    1    1
    58   12    4    1    1    1
   121   22    8    1    1    1    1
   248   39   13    5    1    1    1    1
   503   67   22   10    1    1    1    1    1
  1014  113   36   16    6    1    1    1    1    1
  2037  188   56   23   12    1    1    1    1    1    1
  4084  310   86   35   19    7    1    1    1    1    1    1
Row 4 counts the following partitions:
  {{1234}}        {{1234}}    {{1234}}  {{1234}}
  {{1}{234}}      {{12}{34}}
  {{12}{34}}      {{14}{23}}
  {{123}{4}}
  {{124}{3}}
  {{134}{2}}
  {{14}{23}}
  {{1}{2}{34}}
  {{1}{23}{4}}
  {{12}{3}{4}}
  {{14}{2}{3}}
  {{1}{2}{3}{4}}
		

Crossrefs

Column k = 0 is A000325. Column k = 1 is A066982. Column k = 2 is A323951. Column k = 3 is A306351.

Programs

  • Mathematica
    cycedsprop[n_,k_]:=Union[Sort/@Join@@Table[1+Mod[Range[i,j]-1,n],{i,n},{j,i+k,n+i-1}]];
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[cycedsprop[n,k],Range[n]]],{n,12},{k,0,n-1}]
  • PARI
    T(n,k) = 1 - n + sum(i=1, n\(k+1), n*binomial(n-i*k-1, i-1)/i) \\ Andrew Howroyd, Jan 19 2023

Formula

T(n,k) = 1 - n + Sum_{i=1..floor(n/(k+1))} n*binomial(n-i*k-1, i-1)/i. - Andrew Howroyd, Jan 19 2023

A306417 Number of self-conjugate set partitions of {1, ..., n}.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 7, 7, 46, 39, 321
Offset: 0

Views

Author

Gus Wiseman, Feb 14 2019

Keywords

Comments

This sequence counts set partitions fixed under Callan's conjugation operation.

Examples

			The  a(3) = 1 through a(7) = 7 self-conjugate set partitions:
  {{12}{3}}  {{13}{24}}  {{123}{4}{5}}  {{135}{246}}    {{13}{246}{57}}
                         {{13}{2}{45}}  {{124}{35}{6}}  {{15}{246}{37}}
                                        {{13}{25}{46}}  {{1234}{5}{6}{7}}
                                        {{14}{2}{356}}  {{124}{3}{56}{7}}
                                        {{14}{236}{5}}  {{134}{2}{5}{67}}
                                        {{14}{25}{36}}  {{14}{2}{3}{567}}
                                        {{145}{26}{3}}  {{14}{23}{57}{6}}
		

Crossrefs

A323951 Number of ways to split an n-cycle into connected subgraphs, all having at least three vertices.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 4, 8, 13, 22, 36, 56, 86, 131, 197, 294, 437, 647, 955, 1407, 2070, 3042, 4467, 6556, 9618, 14106, 20684, 30325, 44455, 65164, 95515, 139997, 205189, 300733, 440760, 645980, 946745, 1387538, 2033552, 2980332, 4367906, 6401495, 9381865, 13749810
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			The a(3) = 1 through a(7) = 8 partitions:
  {{123}}  {{1234}}  {{12345}}  {{123456}}    {{1234567}}
                                {{123}{456}}  {{123}{4567}}
                                {{126}{345}}  {{1234}{567}}
                                {{156}{234}}  {{1237}{456}}
                                              {{1267}{345}}
                                              {{127}{3456}}
                                              {{1567}{234}}
                                              {{167}{2345}}
		

Crossrefs

Programs

  • Mathematica
    cycedsprop[n_,k_]:=Union[Sort/@Join@@Table[1+Mod[Range[i,j]-1,n],{i,n},{j,i+k,n+i-1}]];
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[cycedsprop[n,2],Range[n]]],{n,15}]

Formula

G.f.: (x^7-2*x^6+x^3-3*x^2+3*x-1)/((x^3+x-1)*(x-1)^2). - Alois P. Heinz, Feb 10 2019

Extensions

More terms from Alois P. Heinz, Feb 10 2019

A324012 Number of self-complementary set partitions of {1, ..., n} with no singletons or cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 3, 2, 14, 11, 80, 85, 510
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

The complement of a set partition pi of {1, ..., n} is defined as n + 1 - pi (elementwise) on page 3 of Callan. For example, the complement of {{1,5},{2},{3,6},{4}} is {{1,4},{2,6},{3},{5}}. This sequence counts certain self-conjugate set partitions, i.e., fixed points under Callan's conjugation operation.

Examples

			The  a(6) = 3 through a(9) = 11 self-complementary set partitions with no singletons or cyclical adjacencies:
  {{135}{246}}    {{13}{246}{57}}  {{1357}{2468}}      {{136}{258}{479}}
  {{13}{25}{46}}  {{15}{246}{37}}  {{135}{27}{468}}    {{147}{258}{369}}
  {{14}{25}{36}}                   {{146}{27}{358}}    {{148}{269}{357}}
                                   {{147}{258}{36}}    {{168}{249}{357}}
                                   {{157}{248}{36}}    {{13}{258}{46}{79}}
                                   {{13}{24}{57}{68}}  {{14}{258}{37}{69}}
                                   {{13}{25}{47}{68}}  {{14}{28}{357}{69}}
                                   {{14}{26}{37}{58}}  {{16}{258}{37}{49}}
                                   {{14}{27}{36}{58}}  {{16}{28}{357}{49}}
                                   {{15}{26}{37}{48}}  {{17}{258}{39}{46}}
                                   {{15}{27}{36}{48}}  {{18}{29}{357}{46}}
                                   {{16}{24}{38}{57}}
                                   {{16}{25}{38}{47}}
                                   {{17}{28}{35}{46}}
		

Crossrefs

Cf. A000110, A000126, A000296, A001610, A080107, A169985, A261139, A306417 (all self-conjugate set partitions), A324011 (self-complementarity not required), A324013 (adjacencies allowed), A324014 (singletons allowed), A324015.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    cmp[stn_]:=Union[Sort[Max@@Join@@stn+1-#]&/@stn];
    Table[Select[sps[Range[n]],And[cmp[#]==Sort[#],Count[#,{_}]==0,Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]//Length,{n,0,10}]

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

A323953 Regular triangle read by rows where T(n, k) is the number of ways to split an n-cycle into singletons and connected subsequences of sizes > k.

Original entry on oeis.org

1, 2, 1, 5, 2, 1, 12, 6, 2, 1, 27, 12, 7, 2, 1, 58, 23, 14, 8, 2, 1, 121, 44, 23, 16, 9, 2, 1, 248, 82, 38, 26, 18, 10, 2, 1, 503, 149, 65, 38, 29, 20, 11, 2, 1, 1014, 267, 112, 57, 42, 32, 22, 12, 2, 1, 2037, 475, 189, 90, 57, 46, 35, 24, 13, 2, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			Triangle begins:
     1
     2    1
     5    2    1
    12    6    2    1
    27   12    7    2    1
    58   23   14    8    2    1
   121   44   23   16    9    2    1
   248   82   38   26   18   10    2    1
   503  149   65   38   29   20   11    2    1
  1014  267  112   57   42   32   22   12    2    1
  2037  475  189   90   57   46   35   24   13    2    1
  4084  841  312  146   80   62   50   38   26   14    2    1
Row 4 counts the following connected partitions:
  {{1234}}        {{1234}}        {{1234}}        {{1}{2}{3}{4}}
  {{1}{234}}      {{1}{234}}      {{1}{2}{3}{4}}
  {{12}{34}}      {{123}{4}}
  {{123}{4}}      {{124}{3}}
  {{124}{3}}      {{134}{2}}
  {{134}{2}}      {{1}{2}{3}{4}}
  {{14}{23}}
  {{1}{2}{34}}
  {{1}{23}{4}}
  {{12}{3}{4}}
  {{14}{2}{3}}
  {{1}{2}{3}{4}}
		

Crossrefs

First column is A000325. Second column is A323950.

Programs

  • Mathematica
    cyceds[n_,k_]:=Union[Sort/@Join@@Table[1+Mod[Range[i,j]-1,n],{i,n},{j,Prepend[Range[i+k,n+i-1],i]}]];
    spsu[,{}]:={{}};spsu[foo,set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@spsu[Select[foo,Complement[#,Complement[set,s]]=={}&],Complement[set,s]]]/@Cases[foo,{i,_}];
    Table[Length[spsu[cyceds[n,k],Range[n]]],{n,10},{k,n}]
  • PARI
    T(n,k) = {1 + if(kAndrew Howroyd, Jan 19 2023

Formula

T(n,k) = 2 - n + Sum_{i=1..floor(n/k)} n*binomial(n-i*k+i-1, 2*i-1)/i for 1 <= k < n. - Andrew Howroyd, Jan 19 2023

A032190 Number of cyclic compositions of n into parts >= 2.

Original entry on oeis.org

0, 1, 1, 2, 2, 4, 4, 7, 9, 14, 18, 30, 40, 63, 93, 142, 210, 328, 492, 765, 1169, 1810, 2786, 4340, 6712, 10461, 16273, 25414, 39650, 62074, 97108, 152287, 238837, 375166, 589526, 927554, 1459960, 2300347, 3626241, 5721044, 9030450, 14264308, 22542396
Offset: 1

Views

Author

Keywords

Comments

Number of ways to partition n elements into pie slices each with at least 2 elements.
Hackl and Prodinger (2018) indirectly refer to this sequence because their Proposition 2.1 contains the g.f. of this sequence. In the paragraph before this proposition, however, they refer to sequence A000358(n) = a(n) + 1. - Petros Hadjicostas, Jun 04 2019

Crossrefs

a(n) = A000358(n) - 1. Cf. A008965.

Programs

  • Maple
    # formula (5.3) of Daryl Deford for "Number of distinct Lucas tilings of a 1 X n
    # bracelet up to symmetry" in "Enumerating distinct chessboard tilings"
    A032190 := proc(n)
        local a,i,d ;
        a := 0 ;
        for i from 0 to ceil((n-1)/2) do
            for d in numtheory[divisors](i) do
                if modp(igcd(i,n-i),d) = 0 then
                    a := a+(numtheory[phi](d)*binomial((n-i)/d,i/d))/(n-i) ;
                end if;
            end do:
        end do:
        a ;
    end proc:
    seq(A032190(n),n=1..60) ; # R. J. Mathar, Nov 27 2014
  • Mathematica
    nn=40;Apply[Plus,Table[CoefficientList[Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^(2i)/(1-x^i),{i,1,n}],{x,0,nn}],x],{n,1,nn/2}]] (* Geoffrey Critzer, Aug 10 2013 *)
    A032190[n_] := Module[{a=0, i, d, j, dd}, For[i=1, i <= Ceiling[(n-1)/2], i++, For[dd = Divisors[i]; j=1, j <= Length[dd], j++, d=dd[[j]]; If[Mod[GCD[i, n-i], d] == 0, a = a + (EulerPhi[d]*Binomial[(n-i)/d, i/d])/(n-i)]]]; a]; Table[A032190[n], {n, 1, 60}] (* Jean-François Alcover, Nov 27 2014, after R. J. Mathar *)

Formula

"CIK" (necklace, indistinct, unlabeled) transform of 0, 1, 1, 1...
From Petros Hadjicostas, Sep 10 2017: (Start)
For all the formulas below, assume n >= 1. Here, phi(n) = A000010(n) is Euler's totient function.
a(n) = (1/n) * Sum_{d|n} b(d)*phi(n/d), where b(n) = A001610(n-1).
a(n) = (1/n) * Sum_{d|n} phi(n/d)*(Fibonacci(d-1) + Fibonacci(d+1) - 1) (because of the equation a(n) = A000358(n) - 1 stated in the CROSSREFS section below).
G.f.: -x/(1-x) + Sum_{k>=1} phi(k)/k * log(1/(1-B(x^k))) where B(x) = x*(1+x). (This is a modification of a formula due to Joerg Arndt.)
G.f.: Sum_{k>=1} phi(k)/k * log((1-x^k)/(1-B(x^k))), which agrees with the one in the Encyclopedia of Combinatorial Structures, #764, above. (We have Sum_{n>=1} (phi(n)/n)*log(1-x^n) = -x/(1-x), which follows from the Lambert series Sum_{n>=1} phi(n)*x^n/(1-x^n) = x/(1-x)^2.)
Sum_{d|n} a(d)*d = n*Sum_{d|n} b(d)/d, where b(n) = A001610(n-1).
(End)
a(n) = Sum_{1 <= i <= ceiling((n-1)/2)} [ (1/(n - i)) * Sum_{d|gcd(i, n-i)} phi(d) * binomial((n - i)/d, i/d) ]. (This is a slight variation of DeFord's formula for the number of distinct Lucas tilings of a 1 X n bracelet up to symmetry, where we exclude the case with i = 0 dominoes.) - Petros Hadjicostas, Jun 07 2019

Extensions

Better name from Geoffrey Critzer, Aug 10 2013

A306357 Number of nonempty subsets of {1, ..., n} containing no three cyclically successive elements.

Original entry on oeis.org

0, 1, 3, 6, 10, 20, 38, 70, 130, 240, 442, 814, 1498, 2756, 5070, 9326, 17154, 31552, 58034, 106742, 196330, 361108, 664182, 1221622, 2246914, 4132720, 7601258, 13980894, 25714874, 47297028, 86992798, 160004702, 294294530, 541292032, 995591266, 1831177830
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.
Set partitions using these subsets are counted by A323949.

Examples

			The a(1) = 1 through a(5) = 20 stable subsets:
  {1}  {1}    {1}    {1}    {1}
       {2}    {2}    {2}    {2}
       {1,2}  {3}    {3}    {3}
              {1,2}  {4}    {4}
              {1,3}  {1,2}  {5}
              {2,3}  {1,3}  {1,2}
                     {1,4}  {1,3}
                     {2,3}  {1,4}
                     {2,4}  {1,5}
                     {3,4}  {2,3}
                            {2,4}
                            {2,5}
                            {3,4}
                            {3,5}
                            {4,5}
                            {1,2,4}
                            {1,3,4}
                            {1,3,5}
                            {2,3,5}
                            {2,4,5}
		

Crossrefs

Programs

  • Mathematica
    stabsubs[g_]:=Select[Rest[Subsets[Union@@g]],Select[g,Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&];
    Table[Length[stabsubs[Partition[Range[n],3,1,1]]],{n,15}]

Formula

For n >= 3 we have a(n) = A001644(n) - 1.
From Chai Wah Wu, Jan 06 2020: (Start)
a(n) = 2*a(n-1) - a(n-4) for n > 6.
G.f.: x*(x^5 + x^4 - 2*x^3 + x + 1)/(x^4 - 2*x + 1). (End)

A324014 Number of self-complementary set partitions of {1, ..., n} with no cyclical adjacencies (successive elements in the same block, where 1 is a successor of n).

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 9, 16, 43, 89, 250, 571, 1639
Offset: 0

Views

Author

Gus Wiseman, Feb 12 2019

Keywords

Comments

The complement of a set partition pi of {1, ..., n} is defined as n + 1 - pi (elementwise) on page 3 of Callan. For example, the complement of {{1,5},{2},{3,6},{4}} is {{1,4},{2,6},{3},{5}}.

Examples

			The  a(3) = 1 through a(6) = 9 self-complementary set partitions with no cyclical adjacencies:
  {{1}{2}{3}}  {{13}{24}}      {{14}{25}{3}}      {{135}{246}}
               {{1}{2}{3}{4}}  {{1}{24}{3}{5}}    {{13}{25}{46}}
                               {{1}{2}{3}{4}{5}}  {{14}{25}{36}}
                                                  {{1}{24}{35}{6}}
                                                  {{13}{2}{46}{5}}
                                                  {{14}{2}{36}{5}}
                                                  {{15}{26}{3}{4}}
                                                  {{1}{25}{3}{4}{6}}
                                                  {{1}{2}{3}{4}{5}{6}}
		

Crossrefs

Cf. A000110, A000296, A001610, A080107 (self-complementary), A169985, A324012 (self-conjugate), A324015.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    cmp[stn_]:=Union[Sort[Max@@Join@@stn+1-#]&/@stn];
    Table[Select[sps[Range[n]],And[cmp[#]==Sort[#],Total[If[First[#]==1&&Last[#]==n,1,0]+Count[Subtract@@@Partition[#,2,1],-1]&/@#]==0]&]//Length,{n,0,10}]
Previous Showing 21-30 of 52 results. Next