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

A327699 Number of refinement sequences n -> ... -> {1}^n, where in each step every single part of a nonempty selection of parts is replaced by a partition of itself into two smaller parts (in weakly decreasing order).

Original entry on oeis.org

1, 1, 1, 4, 9, 48, 211, 1736, 9777, 91169, 739174, 8613817, 83763730, 1105436491, 13222076337, 207852246589, 2789691577561, 47759515531854, 755158220565169, 14595210284816038, 255814560447492788, 5373613110108953192, 105867623217924984398, 2460702471446564481641
Offset: 1

Views

Author

Alois P. Heinz, Sep 22 2019

Keywords

Examples

			a(4) = 4:
  4 -> 31   -> 211  -> 1111
  4 -> 22   -> 1111
  4 -> 22   -> 112  -> 1111
  4 -> 22   -> 211  -> 1111
		

Crossrefs

A276027 Number of ways to transform a sequence of n ones to a single number by continually removing two numbers and replacing them with their sum modulo 3.

Original entry on oeis.org

1, 1, 1, 2, 4, 7, 18, 43, 93, 266, 702, 1687, 5136, 14405, 36898, 117016, 341842, 914064, 2983027, 8972121, 24743851, 82478973, 253555061, 715745648, 2424954125, 7582390623, 21796481477, 74805170349, 237095926682, 691568408221, 2398418942361, 7686495623620
Offset: 1

Views

Author

Caleb Ji, Aug 16 2016

Keywords

Comments

Can be considered as the number of maximal chains in a poset whose nodes are the possible states of the sequence. In this sense it counts the same things as A002846 when the elements of that poset are taken modulo 3.
Originally this entry had a reference to a paper on the arXiv by Caleb Ji, Enumerative Properties of Posets Corresponding to a Certain Class of No Strategy Games, arXiv:1608.06025 [math.CO], 2016. However, this article has since been removed from the arXiv. - N. J. A. Sloane, Sep 07 2018

Examples

			For n = 4, the two ways are 1111 -> 211 -> 10 -> 1 and 1111 -> 211 -> 22 -> 1.
		

Crossrefs

Similar to A002846 with nodes taken modulo 3.
A117143 is the total number of nodes in this poset.

Programs

  • Maple
    b:= proc(x, y, z) option remember;
          `if`(x+y+z=1, 1, `if`(y>0 and z>0, b(x+1, y-1, z-1), 0)+
          `if`(x>1 or x>0 and y>0 or x>0 and z>0, b(x-1, y, z), 0)+
          `if`(y>1, b(x, y-2, z+1), 0)+`if`(z>1, b(x, y+1, z-2), 0))
        end:
    a:= n-> b(0, n, 0):
    seq(a(n), n=1..35);  # Alois P. Heinz, Aug 18 2016
  • Mathematica
    b[x_,y_,z_] := b[x, y, z] = If[x+y+z==1, 1,  If[y>0 && z>0, b[x+1, y-1, z-1], 0] + If[x>1 || x>0 && y>0 || x>0 && z>0, b[x-1, y, z], 0] + If[y>1, b[x, y-2, z+1], 0] + If[z>1, b[x, y+1, z-2], 0]]; a[n_]:= b[0, n, 0]; Array[a,35] (* Jean-François Alcover, Aug 07 2017, after Alois P. Heinz *)
  • Python
    from sympy.core.cache import cacheit
    @cacheit
    def b(x, y, z): return 1 if x + y + z==1 else (b(x + 1, y - 1, z - 1) if y>0 and z>0 else 0) + (b(x - 1, y, z) if x>1 or x>0 and y>0 or x>0 and z>0 else 0) + (b(x, y - 2, z + 1) if y>1 else 0) + (b(x, y + 1, z - 2) if z>1 else 0)
    def a(n): return b(0, n, 0)
    print([a(n) for n in range(1, 36)]) # Indranil Ghosh, Aug 09 2017, after Maple code

Formula

a(n) = f(0, n, 0) where f(a, b, c) is the number of ways to reach one number beginning with a zeros, b ones, and c twos.
Then f(a, b, c) = f_1 + f_2 + f_3 + f_4 where f_1 = f(a-1, b, c) if a>=2 or a, b >=1 or a,c >=1, f_2 = f(a, b-2, c+1) if b >= 2, f_3 = f(a, b+1, c-2) if c >= 2, and f_4 = f(a+1, b-1, c-1) if b, c >= 1, and each are 0 otherwise. Initial terms: f(a, b, c) = 1 for all 1 <= a+b+c <= 2, where a, b, c >= 0.

Extensions

a(19)-a(32) from Alois P. Heinz, Aug 18 2016

A330784 Triangle read by rows where T(n,k) is the number of balanced reduced multisystems of depth k with n equal atoms.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 5, 9, 5, 1, 9, 28, 36, 16, 1, 13, 69, 160, 164, 61, 1, 20, 160, 580, 1022, 855, 272, 1, 28, 337, 1837, 4996, 7072, 4988, 1385
Offset: 2

Views

Author

Gus Wiseman, Jan 03 2020

Keywords

Comments

A balanced reduced multisystem is either a finite multiset, or a multiset partition with at least two parts, not all of which are singletons, of a balanced reduced multisystem.

Examples

			Triangle begins:
    1
    1    1
    1    3    2
    1    5    9    5
    1    9   28   36   16
    1   13   69  160  164   61
    1   20  160  580 1022  855  272
    1   28  337 1837 4996 7072 4988 1385
Row n = 5 counts the following multisystems (strings of 1's are replaced by their lengths):
  5  {1,4}      {{1},{1,3}}      {{{1}},{{1},{1,2}}}
     {2,3}      {{1},{2,2}}      {{{1,1}},{{1},{2}}}
     {1,1,3}    {{2},{1,2}}      {{{1}},{{2},{1,1}}}
     {1,2,2}    {{3},{1,1}}      {{{1,2}},{{1},{1}}}
     {1,1,1,2}  {{1},{1,1,2}}    {{{2}},{{1},{1,1}}}
                {{1,1},{1,2}}
                {{2},{1,1,1}}
                {{1},{1},{1,2}}
                {{1},{2},{1,1}}
		

Crossrefs

Row sums are A318813.
Column k = 3 is A007042.
Column k = 4 is A001970(n) - 3*A000041(n) + 3.
Column k = n is A000111.
Row n is row prime(n) of A330727.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
    				

Formula

T(n,3) = A000041(n) - 2.
T(n,4) = A001970(n) - 3 * A000041(n) + 3.

A213597 Triangle T(n,k), n>=1, 0<=k<=A000041(n), read by rows: row n gives the coefficients of the chromatic polynomial of the ranked poset L(n) of partitions of n, highest powers first.

Original entry on oeis.org

1, 0, 1, -1, 0, 1, -2, 1, 0, 1, -5, 10, -9, 3, 0, 1, -9, 36, -79, 98, -64, 17, 0, 1, -17, 136, -666, 2192, -5032, 8111, -9013, 6569, -2818, 537, 0, 1, -28, 378, -3242, 19648, -88676, 306308, -819933, 1703404, -2723374, 3285552, -2887734, 1739326, -639065, 107435, 0
Offset: 1

Views

Author

Alois P. Heinz, Jun 15 2012

Keywords

Comments

The ranked poset L(n) of partitions is defined in A002846. A partition of n into k parts is connected to another partition of n into k+1 parts that results from splitting one part of the first partition into two parts.

Examples

			L(5):     (32)---(221)
         /    \ /     \
        /      X       \
       /      / \       \
    (5)---(41)---(311)---(2111)---(11111)
Chromatic polynomial: q^7-9*q^6+36*q^5-79*q^4+98*q^3-64*q^2+17*q.
Triangle T(n,k) begins:
  1,   0;
  1,  -1,   0;
  1,  -2,   1,    0;
  1,  -5,  10,   -9,    3,     0;
  1,  -9,  36,  -79,   98,   -64,   17,     0;
  1, -17, 136, -666, 2192, -5032, 8111, -9013, 6569, -2818, 537, 0;
		

Crossrefs

Row lengths give: 1+A000041(n) = A052810(n).
Row sums (for n>1) and last elements of rows give: A000004.
Columns k=1-2 give: A000012, (-1)*A000097(n-2).

Extensions

Edited by Alois P. Heinz at the suggestion of Gus Wiseman, May 02 2016

A330726 Number of balanced reduced multisystems of maximum depth whose atoms are positive integers summing to n.

Original entry on oeis.org

1, 1, 2, 3, 7, 17, 54, 199, 869, 4341, 24514, 154187
Offset: 0

Views

Author

Gus Wiseman, Jan 03 2020

Keywords

Comments

A balanced reduced multisystem is either a finite multiset, or a multiset partition with at least two parts, not all of which are singletons, of a balanced reduced multisystem.

Examples

			The a(1) = 1 through a(5) = 17 multisystems (commas elided):
  {1}  {2}   {3}        {4}               {5}
       {11}  {12}       {22}              {23}
             {{1}{11}}  {13}              {14}
                        {{1}{12}}         {{1}{13}}
                        {{2}{11}}         {{1}{22}}
                        {{{1}}{{1}{11}}}  {{2}{12}}
                        {{{11}}{{1}{1}}}  {{3}{11}}
                                          {{{1}}{{1}{12}}}
                                          {{{11}}{{1}{2}}}
                                          {{{1}}{{2}{11}}}
                                          {{{12}}{{1}{1}}}
                                          {{{2}}{{1}{11}}}
                                          {{{{1}}}{{{1}}{{1}{11}}}}
                                          {{{{1}}}{{{11}}{{1}{1}}}}
                                          {{{{1}{1}}}{{{1}}{{11}}}}
                                          {{{{1}{11}}}{{{1}}{{1}}}}
                                          {{{{11}}}{{{1}}{{1}{1}}}}
		

Crossrefs

The case with all atoms equal to 1 is A000111.
The non-maximal version is A330679.
A tree version is A320160.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
    				

A276032 Number of refinements of the partition n^1 with all numbers taken modulo 2.

Original entry on oeis.org

1, 2, 3, 7, 8, 21, 22, 63, 64, 195, 196, 624, 625, 2054, 2055, 6916, 6917, 23712, 23713, 82498, 82499, 290510, 290511, 1033410, 1033411, 3707850, 3707851, 13402695, 13402696, 48760365, 48760366, 178405155, 178405156, 656043855, 656043856, 2423307045
Offset: 1

Views

Author

Caleb Ji, Aug 17 2016

Keywords

Comments

Consider the ranked poset L(n) of partitions defined in A002846, and take the elements of each node modulo 2, collapsing two equivalent nodes into 1. Then a(n) is the total number of paths of all lengths 0,1,...,n-1 that start at (n mod 2)^1 and end at any node in the poset.
Odd-indexed terms are the partial sums of Catalan numbers: A014138.
Even-indexed terms are one less than the following odd-indexed term.
Originally this entry had a reference to a paper on the arXiv by Caleb Ji, Enumerative Properties of Posets Corresponding to a Certain Class of No Strategy Games, arXiv:1608.06025 [math.CO], 2016. However, this article has since been removed from the arXiv. - N. J. A. Sloane, Sep 07 2018

Crossrefs

A276033 Number of generalizations of the partition 1^n with all elements taken modulo 2.

Original entry on oeis.org

1, 2, 3, 6, 8, 17, 22, 50, 64, 154, 196, 493, 625, 1626, 2055, 5487, 6917, 18851, 23713, 65703, 82499, 231725, 290511, 825399, 1033411, 2964951, 3707851, 10728256, 13402696, 39065521, 48760366, 143047486, 178405156, 526399066, 656043856, 1945668346, 2423307046
Offset: 1

Views

Author

Caleb Ji, Aug 17 2016

Keywords

Comments

Consider the ranked poset L(n) of partitions defined in A002846, and take the elements of each node modulo 2, collapsing two equivalent nodes into 1. Then a(n) is the total number of paths of all lengths 0,1,...,n-1 that start at any node in the poset and end at 1^n.
Odd-indexed terms are the partial sums of Catalan numbers: A014138. Even-indexed terms a_{2n} are C_n (the n-th Catalan number) less than the following odd-indexed term.
Originally this entry had a reference to a paper on the arXiv by Caleb Ji, Enumerative Properties of Posets Corresponding to a Certain Class of No Strategy Games, arXiv:1608.06025 [math.CO], 2016. However, this article has since been removed from the arXiv. - N. J. A. Sloane, Sep 07 2018

Crossrefs

A300384 In the ranked poset of integer partitions ordered by refinement, number of maximal chains from the local minimum to the partition with Heinz number n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 11, 2, 2, 1, 33, 1, 116, 1, 5, 4, 435, 1, 2, 11, 1, 2, 1832, 2, 8167, 1, 12, 33, 10, 1, 39700, 116, 37, 1, 201785, 5, 1099449, 4, 3, 435, 6237505, 1, 19, 2, 123, 11, 37406458, 1, 27, 2, 474, 1832, 232176847, 2, 1513796040
Offset: 1

Views

Author

Gus Wiseman, Mar 04 2018

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The a(21) = 5 maximal chains are the rows:
(111111)<(21111)<(2211)<(222)<(42)
(111111)<(21111)<(2211)<(411)<(42)
(111111)<(21111)<(2211)<(321)<(42)
(111111)<(21111)<(3111)<(411)<(42)
(111111)<(21111)<(3111)<(321)<(42)
		

Crossrefs

Programs

  • Mathematica
    pcovs[ptn_]:=Select[Union[Reverse/@Sort/@Join@@@Tuples[IntegerPartitions/@ptn]],Length[#]===Length[ptn]+1&];
    coc[ptn_]:=coc[ptn]=If[Max[ptn]===1,1,Total[coc/@pcovs[ptn]]];
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[coc[Reverse[primeMS[n]]],{n,50}]

A330785 Triangle read by rows where T(n,k) is the number of chains of length k from minimum to maximum in the poset of integer partitions of n ordered by refinement.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 3, 2, 0, 1, 5, 8, 4, 0, 1, 9, 25, 28, 11, 0, 1, 13, 57, 111, 99, 33, 0, 1, 20, 129, 379, 561, 408, 116, 0, 1, 28, 253, 1057, 2332, 2805, 1739, 435, 0, 1, 40, 496, 2833, 8695, 15271, 15373, 8253, 1832, 0, 1, 54, 898, 6824, 28071, 67790, 98946, 85870, 40789, 8167
Offset: 1

Views

Author

Gus Wiseman, Jan 03 2020

Keywords

Examples

			Triangle begins:
   1
   0   1
   0   1   1
   0   1   3   2
   0   1   5   8   4
   0   1   9  25  28  11
   0   1  13  57 111  99  33
   0   1  20 129 379 561 408 116
Row n = 5 counts the following chains (minimum and maximum not shown):
  ()  (14)    (113)->(14)    (1112)->(113)->(14)
      (23)    (113)->(23)    (1112)->(113)->(23)
      (113)   (122)->(14)    (1112)->(122)->(14)
      (122)   (122)->(23)    (1112)->(122)->(23)
      (1112)  (1112)->(14)
              (1112)->(23)
              (1112)->(113)
              (1112)->(122)
		

Crossrefs

Row sums are A213427.
Main diagonal is A002846.
Column k=3 is A007042.
Dominated by A330784.
The version for set partitions is A008826.
The version for factorizations is A330935.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
    upr[q_]:=Union[Sort/@Apply[Plus,mps[q],{2}]];
    paths[eds_,start_,end_]:=If[start==end,Prepend[#,{}],#]&[Join@@Table[Prepend[#,e]&/@paths[eds,Last[e],end],{e,Select[eds,First[#]==start&]}]];
    Table[Length[Select[paths[Join@@Table[{y,#}&/@DeleteCases[upr[y],y],{y,Sort/@IntegerPartitions[n]}],ConstantArray[1,n],{n}],Length[#]==k-1&]],{n,8},{k,n}]

Formula

T(n,k) = A330935(2^n,k).
Previous Showing 51-59 of 59 results.