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

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)

A323949 Number of set partitions of {1, ..., n} with no block containing three distinct cyclically successive vertices.

Original entry on oeis.org

1, 1, 2, 4, 10, 36, 145, 631, 3015, 15563, 86144, 508311, 3180930, 21018999, 146111543, 1065040886, 8117566366, 64531949885, 533880211566, 4587373155544, 40865048111424, 376788283806743, 3590485953393739, 35312436594162173, 357995171351223109, 3736806713651177702
Offset: 0

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Comments

Cyclically successive means 1 is a successor of n.

Examples

			The a(1) = 1 through a(4) = 10 set partitions:
  {{1}}  {{1,2}}    {{1},{2,3}}    {{1,2},{3,4}}
         {{1},{2}}  {{1,2},{3}}    {{1,3},{2,4}}
                    {{1,3},{2}}    {{1,4},{2,3}}
                    {{1},{2},{3}}  {{1},{2},{3,4}}
                                   {{1},{2,3},{4}}
                                   {{1,2},{3},{4}}
                                   {{1},{2,4},{3}}
                                   {{1,3},{2},{4}}
                                   {{1,4},{2},{3}}
                                   {{1},{2},{3},{4}}
		

Crossrefs

Programs

  • Mathematica
    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[Select[Subsets[Range[n]],Select[Partition[Range[n],3,1,1],Function[ed,UnsameQ@@ed&&Complement[ed,#]=={}]]=={}&],Range[n]]],{n,8}]

Extensions

a(12)-a(25) from Alois P. Heinz, Feb 10 2019

A323956 Triangle read by rows: T(n, k) = 1 + n * (n - k) for 1 <= k <= n.

Original entry on oeis.org

1, 3, 1, 7, 4, 1, 13, 9, 5, 1, 21, 16, 11, 6, 1, 31, 25, 19, 13, 7, 1, 43, 36, 29, 22, 15, 8, 1, 57, 49, 41, 33, 25, 17, 9, 1, 73, 64, 55, 46, 37, 28, 19, 10, 1, 91, 81, 71, 61, 51, 41, 31, 21, 11, 1, 111, 100, 89, 78, 67, 56, 45, 34, 23, 12, 1
Offset: 1

Views

Author

Gus Wiseman, Feb 10 2019

Keywords

Examples

			Triangle begins:
  n\k:   1   2   3   4   5   6   7   8   9  10  11  12
  ====================================================
    1:   1
    2:   3   1
    3:   7   4   1
    4:  13   9   5   1
    5:  21  16  11   6   1
    6:  31  25  19  13   7   1
    7:  43  36  29  22  15   8   1
    8:  57  49  41  33  25  17   9   1
    9:  73  64  55  46  37  28  19  10   1
   10:  91  81  71  61  51  41  31  21  11   1
   11: 111 100  89  78  67  56  45  34  23  12   1
   12: 133 121 109  97  85  73  61  49  37  25  13   1
  etc.
		

Crossrefs

First column is A002061. Second column is A000290. Third column is A028387.

Programs

  • Magma
    [[1+n*(n-k): k in [1..n]]: n in [1..12]]; // G. C. Greubel, Apr 22 2019
    
  • Mathematica
    Table[1+n*(n-k),{n,12},{k,n}]//Flatten
  • PARI
    {T(n,k) = 1+n*(n-k)}; \\ G. C. Greubel, Apr 22 2019
    
  • Sage
    [[1+n*(n-k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Apr 22 2019

Formula

From Werner Schulte, Feb 12 2019: (Start)
G.f.: Sum_{n>0,k=1..n} T(n,k)*x^k*t^n = x*t*((1-t+2*t^2)*(1-x*t) + (1-t)*t)/((1-t)^3*(1-x*t)^2).
Row sums: Sum_{k=1..n} T(n,k) = A006000(n-1) for n > 0.
Recurrence: T(n,k) = T(n,k-1) - n for 1 < k <= n with initial values T(n,1) = n^2-n+1 for n > 0.
Recurrence: T(n,k) = T(n-1,k) + 2*n-k-1 for 1 <= k < n with initial values T(n,n) = 1 for n > 0.
(End)
Showing 1-3 of 3 results.