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.

A085489 a(n) is the number of subsets of {1,...,n} containing no solutions to x+y=z with x and y distinct (one version of "sum-free subsets").

Original entry on oeis.org

1, 2, 4, 7, 13, 22, 37, 61, 102, 162, 261, 410, 646, 1001, 1553, 2370, 3645, 5515, 8303, 12470, 18713, 27811, 41244, 60962, 89733, 131870, 192522, 281125, 408680, 593880, 855661, 1238592, 1779614, 2563476, 3660084, 5255913, 7473380, 10696444, 15137517
Offset: 0

Views

Author

Eric W. Weisstein, Jul 02 2003

Keywords

Comments

First differs from A151897 at a(7) = 61, A151897(7) = 60. The one subset counted under a(7) but not under A151897(7) is {1,2,4,7}. - Gus Wiseman, Jun 07 2019

Examples

			From _Gus Wiseman_, Jun 07 2019: (Start)
The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}     {}
      {1}  {1}    {1}    {1}
           {2}    {2}    {2}
           {1,2}  {3}    {3}
                  {1,2}  {4}
                  {1,3}  {1,2}
                  {2,3}  {1,3}
                         {1,4}
                         {2,3}
                         {2,4}
                         {3,4}
                         {1,2,4}
                         {2,3,4}
The a(5) = 22 subsets:
  {}  {1}  {1,2}  {1,2,4}
      {2}  {1,3}  {1,2,5}
      {3}  {1,4}  {1,3,5}
      {4}  {1,5}  {2,3,4}
      {5}  {2,3}  {2,4,5}
           {2,4}  {3,4,5}
           {2,5}
           {3,4}
           {3,5}
           {4,5}
(End)
		

Crossrefs

See A007865 for another version.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[ #,Select[ Plus@@@ Subsets[ #,{2}],#<=n&]]=={}&]],{n,0,10}] (* Gus Wiseman, Jun 07 2019 *)

Formula

a(n) = 2^n - A088809(n). - Reinhard Zumkeller, Oct 19 2003

Extensions

More terms from Reinhard Zumkeller, Jul 13 2003
Edited by David Wasserman, Apr 16 2008
a(0) = 1 prepended by Gus Wiseman, Jun 07 2019