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.

A121269 Number of maximal sum-free subsets of {1,2,...,n}.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 13, 17, 23, 29, 37, 51, 66, 86, 118, 158, 201, 265, 359, 471, 598, 797, 1043, 1378, 1765, 2311, 3064, 3970, 5017, 6537, 8547, 11020, 14007, 18026, 23404, 30026, 37989, 48945, 62759, 80256, 101070, 129193, 164835, 209279, 262693, 334127
Offset: 0

Views

Author

N. Hindman (nhindman(AT)aol.com), Aug 23 2006

Keywords

Comments

Also the number of maximal subsets of {1..n} containing no differences of pairs of elements. - Gus Wiseman, Jul 10 2019

Examples

			a(5)=5 because the maximal sum-free subsets of {1,2,3,4,5} are {1,4}, {2,3}, {2,5}, {1,3,5} and {3,4,5}
From _Gus Wiseman_, Jul 10 2019: (Start)
The a(1) = 1 through a(8) = 13 subsets:
  {1}  {1}  {1,3}  {1,3}  {1,4}    {2,3}    {1,4,6}    {1,3,8}
       {2}  {2,3}  {1,4}  {2,3}    {1,3,5}  {1,4,7}    {1,4,6}
                   {2,3}  {2,5}    {1,4,6}  {2,3,7}    {1,4,7}
                   {3,4}  {1,3,5}  {2,5,6}  {2,5,6}    {1,5,8}
                          {3,4,5}  {3,4,5}  {2,6,7}    {1,6,8}
                                   {4,5,6}  {3,4,5}    {2,5,6}
                                            {1,3,5,7}  {2,5,8}
                                            {4,5,6,7}  {2,6,7}
                                                       {3,4,5}
                                                       {1,3,5,7}
                                                       {2,3,7,8}
                                                       {4,5,6,7}
                                                       {5,6,7,8}
(End)
		

Crossrefs

Maximal product-free subsets are A326496.
Sum-free subsets are A007865.
Maximal sum-free and product-free subsets are A326497.
Subsets with sums are A326083.
Maximal subsets without sums of distinct elements are A326498.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],Intersection[#,Plus@@@Tuples[#,2]]=={}&]]],{n,0,10}] (* Gus Wiseman, Jul 10 2019 *)

Extensions

a(0) = 1 prepended by Gus Wiseman, Jul 10 2019
Terms a(42) and beyond from Fausto A. C. Cariboni, Oct 26 2020