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-10 of 14 results. Next

A093971 Number of sum-full subsets of {1,...,n}; subsets A such that there is a solution to x+y=z for x,y,z in A.

Original entry on oeis.org

0, 1, 2, 7, 16, 40, 86, 195, 404, 873, 1795, 3727, 7585, 15537, 31368, 63582, 127933, 257746, 517312, 1038993, 2081696, 4173322, 8355792, 16731799, 33484323, 67014365, 134069494, 268234688, 536562699, 1073326281, 2146849378, 4294117419, 8588623348, 17178130162
Offset: 1

Views

Author

T. D. Noe, Apr 20 2004

Keywords

Comments

In sumset notation, number of subsets A of {1,...,n} such that the intersection of A and 2A is nonempty.
A variation of binary sum-full sets where parts can be re-used, this sequence counts subsets of {1..n} containing a part equal to the sum of two other (possibly equal) parts. The complement is counted by A007865. The non-binary version is A364914. For non-re-usable parts we have A088809. - Gus Wiseman, Aug 14 2023

Examples

			The a(1) = 0 through a(5) = 16 subsets:
  .  {1,2}  {1,2}    {1,2}      {1,2}
            {1,2,3}  {2,4}      {2,4}
                     {1,2,3}    {1,2,3}
                     {1,2,4}    {1,2,4}
                     {1,3,4}    {1,2,5}
                     {2,3,4}    {1,3,4}
                     {1,2,3,4}  {1,4,5}
                                {2,3,4}
                                {2,3,5}
                                {2,4,5}
                                {1,2,3,4}
                                {1,2,3,5}
                                {1,2,4,5}
                                {1,3,4,5}
                                {2,3,4,5}
                                {1,2,3,4,5}
		

Crossrefs

The complement is counted by A007865.
The version without re-usable parts is A088809 (differences A364756), complement A085489 (differences A364755).
The non-binary version is A364914, complement A326083.
The non-binary version w/o re-usable parts is A364534, complement A151897.
The version for partitions is A363225:
- ranks A364348,
- strict A363226,
- non-binary A364839,
- without re-usable parts A237113,
- non-binary without re-usable parts A237668.
The complement for partitions is A364345:
- ranks A364347,
- strict A364346,
- non-binary A364350,
- without re-usable parts A236912,
- non-binary without re-usable parts A237667.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Total/@Tuples[#,2]]!={}&]],{n,0,10}] (* Gus Wiseman, Aug 14 2023 *)

Formula

a(n) = 2^n - A007865(n).

Extensions

Terms a(31) and beyond from Fausto A. C. Cariboni, Oct 01 2020

A088809 Number of subsets of {1, ..., n} that are not sum-free.

Original entry on oeis.org

0, 0, 0, 1, 3, 10, 27, 67, 154, 350, 763, 1638, 3450, 7191, 14831, 30398, 61891, 125557, 253841, 511818, 1029863, 2069341, 4153060, 8327646, 16687483, 33422562, 66916342, 133936603, 268026776, 536277032, 1072886163, 2146245056, 4293187682, 8587371116
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 19 2003

Keywords

Comments

a(n) = 2^n - A085489(n); a non-sum-free subset contains at least one subset {u,v, w} with w=u+v.
A variation of binary sum-full sets where parts cannot be re-used, this sequence counts subsets of {1..n} with an element equal to the sum of two distinct others. The complement is counted by A085489. The non-binary version is A364534. For re-usable parts we have A093971. - Gus Wiseman, Aug 10 2023

Examples

			From _Gus Wiseman_, Aug 10 2023: (Start)
The set S = {1,3,6,8} has pair-sums {4,7,9,11,14}, which are all missing from S, so it is not counted under a(8).
The set {1,4,6,7} has pair-sum 1 + 6 = 7, so is counted under a(7).
The a(1) = 0 through a(5) = 10 sets:
  .  .  {1,2,3}  {1,2,3}    {1,2,3}
                 {1,3,4}    {1,3,4}
                 {1,2,3,4}  {1,4,5}
                            {2,3,5}
                            {1,2,3,4}
                            {1,2,3,5}
                            {1,2,4,5}
                            {1,3,4,5}
                            {2,3,4,5}
                            {1,2,3,4,5}
(End)
		

Crossrefs

The complement is counted by A085489, differences A364755.
With re-usable parts we have A093971, for partitions A363225.
The complement for partitions is A236912:
non-binary A237667,
ranks A364461,
strict A364533.
The version for partitions is A237113:
non-binary A237668,
ranks A364462,
strict A364670.
The non-binary version is A364534, complement A151897.
First differences are A364756.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Total/@Subsets[#,{2}]]!={}&]],{n,0,10}] (* Gus Wiseman, Aug 10 2023 *)

Extensions

Terms a(32) and beyond from Fausto A. C. Cariboni, Sep 28 2020

A236912 Number of partitions of n such that no part is a sum of two other parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 12, 14, 20, 25, 34, 40, 54, 64, 85, 98, 127, 149, 189, 219, 277, 316, 395, 456, 557, 638, 778, 889, 1070, 1226, 1461, 1667, 1978, 2250, 2645, 3019, 3521, 3997, 4652, 5267, 6093, 6909, 7943, 8982, 10291, 11609, 13251, 14947, 16984, 19104
Offset: 0

Views

Author

Clark Kimberling, Feb 01 2014

Keywords

Comments

These are partitions containing the sum of no 2-element submultiset of the parts, a variation of binary sum-free partitions where parts cannot be re-used, ranked by A364461. The complement is counted by A237113. The non-binary version is A237667. For re-usable parts we have A364345. - Gus Wiseman, Aug 09 2023

Examples

			Of the 11 partitions of 6, only these 3 include a part that is a sum of two other parts: [3,2,1], [2,2,1,1], [2,1,1,1,1].  Thus, a(6) = 11 - 3 = 8.
From _Gus Wiseman_, Aug 09 2023: (Start)
The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (311)    (222)     (322)      (71)
                            (11111)  (411)     (331)      (332)
                                     (3111)    (421)      (521)
                                     (111111)  (511)      (611)
                                               (2221)     (2222)
                                               (4111)     (3311)
                                               (31111)    (5111)
                                               (1111111)  (41111)
                                                          (311111)
                                                          (11111111)
(End)
		

Crossrefs

For subsets of {1..n} we have A085489, complement A088809.
The complement is counted by A237113, ranks A364462.
The non-binary version is A237667, ranks A364531.
The non-binary complement is A237668, ranks A364532.
The version with re-usable parts is A364345, ranks A364347.
The (strict) version for linear combinations of parts is A364350.
These partitions have ranks A364461.
The strict case is A364533, non-binary A364349.
The strict complement is A364670, with re-usable parts A363226.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A108917 counts knapsack partitions, ranks A299702.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    z = 20; t = Map[Count[Map[Length[Cases[Map[Total[#] &, Subsets[#, {2}]],  Apply[Alternatives, #]]] &, IntegerPartitions[#]], 0] &, Range[z]] (* A236912 *)
    u = PartitionsP[Range[z]] - t  (* A237113, Peter J. C. Moses, Feb 03 2014 *)
    Table[Length[Select[IntegerPartitions[n],Intersection[#,Total/@Subsets[#,{2}]]=={}&]],{n,0,15}] (* Gus Wiseman, Aug 09 2023 *)

Formula

a(n) = A000041(n) - A237113(n).

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 17 2023

A365046 Number of subsets of {1..n} containing n such that some element can be written as a nonnegative linear combination of the others.

Original entry on oeis.org

0, 0, 1, 2, 6, 11, 28, 53, 118, 235, 490, 973, 2008, 3990, 8089, 16184, 32563, 65071, 130667, 261183, 523388, 1046748, 2095239, 4190208, 8385030, 16768943, 33546257, 67092732, 134201461, 268400553, 536839090, 1073670970, 2147414967, 4294829905, 8589793931
Offset: 0

Views

Author

Gus Wiseman, Aug 24 2023

Keywords

Comments

Includes all subsets containing both 1 and n.

Examples

			The subset {3,4,10} has 10 = 2*3 + 1*4 so is counted under a(10).
The a(0) = 0 through a(5) = 11 subsets:
  .  .  {1,2}  {1,3}    {1,4}      {1,5}
               {1,2,3}  {2,4}      {1,2,5}
                        {1,2,4}    {1,3,5}
                        {1,3,4}    {1,4,5}
                        {2,3,4}    {2,3,5}
                        {1,2,3,4}  {2,4,5}
                                   {1,2,3,5}
                                   {1,2,4,5}
                                   {1,3,4,5}
                                   {2,3,4,5}
                                   {1,2,3,4,5}
		

Crossrefs

The complement is A124506, first differences of A326083.
The binary complement is A288728, first differences of A007865.
First differences of A364914.
The positive version is A365042, first differences of A365043.
The positive complement is counted by A365045, first differences of A365044.
Without re-usable parts we have A365069, first differences of A364534.
The binary version is A365070, first differences of A093971.
A364350 counts combination-free strict partitions, complement A364839.
A085489 and A364755 count subsets without the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Or@@Table[combs[#[[k]],Union[Delete[#,k]]]!={},{k,Length[#]}]&]],{n,0,10}]

Formula

a(n+1) = 2^n - A124506(n).

A288728 Number of sum-free sets that can be created by adding n to all sum-free sets [1..n-1].

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 18, 19, 47, 43, 102, 116, 238, 240, 553, 554, 1185, 1259, 2578, 2607, 5873, 5526, 11834, 12601, 24692, 24390, 53735, 52534, 107445, 107330, 218727, 215607, 461367, 427778, 891039, 910294, 1804606, 1706828, 3695418, 3411513, 7136850, 6892950
Offset: 1

Views

Author

Ben Burns, Jun 14 2017

Keywords

Comments

Using the standard definition of sum-free set, this is simply the difference of successive terms in A007865.
Number of subsets of {1..n} containing n but not containing the sum of any other two elements (repeats allowed). Also the number of sum-free sets (A007865) with maximum n. - Gus Wiseman, Aug 12 2023

Examples

			1 can be added to {};
2 can be added to {} but not {1};
3 can be added to {},{1},{2};
4 can be added to {},{1},{3} but not {2},{1,3},{2,3}.
From _Gus Wiseman_, Aug 12 2023: (Start)
The a(1) = 1 through a(7) = 18 sum-free sets with maximum n:
  {1}  {2}  {3}    {4}    {5}      {6}      {7}
            {1,3}  {1,4}  {1,5}    {1,6}    {1,7}
            {2,3}  {3,4}  {2,5}    {2,6}    {2,7}
                          {3,5}    {4,6}    {3,7}
                          {4,5}    {5,6}    {4,7}
                          {1,3,5}  {1,4,6}  {5,7}
                          {3,4,5}  {2,5,6}  {6,7}
                                   {4,5,6}  {1,3,7}
                                            {1,4,7}
                                            {1,5,7}
                                            {2,3,7}
                                            {2,6,7}
                                            {3,5,7}
                                            {4,5,7}
                                            {4,6,7}
                                            {5,6,7}
                                            {1,3,5,7}
                                            {4,5,6,7}
(End)
		

Crossrefs

Cf. A007865.
For non-binary sum-free subsets of {1..n} we have A237667.
For sum-free partitions we have A364345, without re-using parts A236912.
Without re-using parts we have A364755, diffs of A085489 (non-bin A151897).
The complement without re-using parts is A364756, differences of A088809.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Intersection[#,Total/@Tuples[#,2]]=={}&]],{n,10}] (* Gus Wiseman, Aug 12 2023 *)

Formula

a(n) = A007865(n) - A007865(n-1).

A365043 Number of subsets of {1..n} whose greatest element can be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

0, 0, 1, 3, 7, 12, 21, 32, 49, 70, 99, 135, 185, 245, 323, 418, 541, 688, 873, 1094, 1368, 1693, 2092, 2564, 3138, 3810, 4620, 5565, 6696, 8012, 9569, 11381, 13518, 15980, 18872, 22194, 26075, 30535, 35711, 41627, 48473, 56290, 65283, 75533, 87298, 100631, 115911, 133219
Offset: 0

Views

Author

Gus Wiseman, Aug 25 2023

Keywords

Comments

Sets of this type may be called "positive combination-full".
Also subsets of {1..n} such that some element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,4,9} has 9 = 3*3 + 0*4, but this is not strictly positive, so S is not counted under a(9).
The subset S = {3,4,10} has 10 = 2*3 + 1*4, so S is counted under a(10).
The a(0) = 0 through a(5) = 12 subsets:
  .  .  {1,2}  {1,2}    {1,2}    {1,2}
               {1,3}    {1,3}    {1,3}
               {1,2,3}  {1,4}    {1,4}
                        {2,4}    {1,5}
                        {1,2,3}  {2,4}
                        {1,2,4}  {1,2,3}
                        {1,3,4}  {1,2,4}
                                 {1,2,5}
                                 {1,3,4}
                                 {1,3,5}
                                 {1,4,5}
                                 {2,3,5}
		

Crossrefs

The binary complement is A007865, first differences A288728.
The binary version is A093971, first differences A365070.
The nonnegative complement is A326083, first differences A124506.
The nonnegative version is A364914, first differences A365046.
First differences are A365042.
The complement is counted by A365044, first differences A365045.
Without re-usable parts we have A364534, first differences A365069.
A085489 and A364755 count subsets with no sum of two distinct elements.
A088809 and A364756 count subsets with some sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Rest[Subsets[Range[n]]],combp[Last[#],Union[Most[#]]]!={}&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365043(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365044(n).

Extensions

a(15)-a(35) from Chai Wah Wu, Nov 20 2023
More terms from Bert Dobbelaere, Apr 28 2025

A364756 Number of subsets of {1..n} containing n and some element equal to the sum of two distinct others.

Original entry on oeis.org

0, 0, 0, 1, 2, 7, 17, 40, 87, 196, 413, 875, 1812, 3741, 7640, 15567, 31493, 63666, 128284, 257977, 518045, 1039478, 2083719, 4174586, 8359837, 16735079, 33493780, 67020261, 134090173, 268250256, 536609131, 1073358893, 2146942626, 4294183434, 8588837984, 17178273355
Offset: 0

Views

Author

Gus Wiseman, Aug 11 2023

Keywords

Examples

			The subset S = {1,3,6,8} has pair-sums {4,7,9,11,14}, which are disjoint from S, so it is not counted under a(8).
The subset {2,3,4,6} has pair-sum 2 + 4 = 6, so is counted under a(6).
The a(0) = 0 through a(6) = 17 subsets:
  .  .  .  {1,2,3}  {1,3,4}    {1,4,5}      {1,5,6}
                    {1,2,3,4}  {2,3,5}      {2,4,6}
                               {1,2,3,5}    {1,2,3,6}
                               {1,2,4,5}    {1,2,4,6}
                               {1,3,4,5}    {1,2,5,6}
                               {2,3,4,5}    {1,3,4,6}
                               {1,2,3,4,5}  {1,3,5,6}
                                            {1,4,5,6}
                                            {2,3,4,6}
                                            {2,3,5,6}
                                            {2,4,5,6}
                                            {1,2,3,4,6}
                                            {1,2,3,5,6}
                                            {1,2,4,5,6}
                                            {1,3,4,5,6}
                                            {2,3,4,5,6}
                                            {1,2,3,4,5,6}
		

Crossrefs

Partial sums are A088809, non-binary A364534.
With re-usable parts we have differences of A093971, complement A288728.
The complement with n is counted by A364755, partial sums A085489(n) - 1.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&Intersection[#,Total/@Subsets[#,{2}]]!={}&]],{n,0,10}]

Formula

First differences of A088809.

Extensions

a(16) onwards added (using A088809) by Andrew Howroyd, Jan 13 2024

A365322 Number of subsets of {1..n} that cannot be linearly combined using positive coefficients to obtain n.

Original entry on oeis.org

0, 1, 2, 5, 11, 26, 54, 116, 238, 490, 994, 2011, 4045, 8131, 16305, 32672, 65412, 130924, 261958, 524066, 1048301, 2096826, 4193904, 8388135, 16776641, 33553759, 67108053, 134216782, 268434324, 536869595, 1073740266, 2147481835, 4294965158, 8589932129
Offset: 0

Views

Author

Gus Wiseman, Sep 04 2023

Keywords

Comments

We consider (for example) that 2x + y + 3z is a positive linear combination of (x,y,z), but 2x + y is not, as the coefficient of z is 0.

Examples

			The set {1,3} has 4 = 1 + 3 so is not counted under a(4). However, 3 cannot be written as a linear combination of {1,3} using all positive coefficients, so it is counted under a(3).
The a(1) = 1 through a(4) = 11 subsets:
  {}  {}     {}       {}
      {1,2}  {2}      {3}
             {1,3}    {1,4}
             {2,3}    {2,3}
             {1,2,3}  {2,4}
                      {3,4}
                      {1,2,3}
                      {1,2,4}
                      {1,3,4}
                      {2,3,4}
                      {1,2,3,4}
		

Crossrefs

The complement is counted by A088314.
The version for strict partitions is A088528.
The nonnegative complement is counted by A365073, without n A365542.
The binary complement is A365315, nonnegative A365314.
The binary version is A365321, nonnegative A365320.
For nonnegative coefficients we have A365380.
A085489 and A364755 count subsets without the sum of two distinct elements.
A124506 appears to count combination-free subsets, differences of A326083.
A179822 counts sum-closed subsets, first differences of A326080.
A364350 counts combination-free strict partitions, non-strict A364915.
A365046 counts combination-full subsets, first differences of A364914.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {{}}, `if`(i<1, {},
          {b(n, i-1)[], seq(map(x->{x[], i}, b(n-i*j, i-1))[], j=1..n/i)}))
        end:
    a:= n-> 2^n-nops(b(n$2)):
    seq(a(n), n=0..33);  # Alois P. Heinz, Sep 04 2023
  • Mathematica
    cpu[n_,y_]:=With[{s=Table[{k,i},{k,Union[y]},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],cpu[n,#]=={}&]],{n,0,10}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365322(n): return (1<Chai Wah Wu, Sep 14 2023

Formula

a(n) = 2^n - A088314(n).
a(n) = A070880(n) + 2^(n-1) for n>=1.

Extensions

More terms from Alois P. Heinz, Sep 04 2023

A365045 Number of subsets of {1..n} containing n such that no element can be written as a positive linear combination of the others.

Original entry on oeis.org

0, 1, 1, 2, 4, 11, 23, 53, 111, 235, 483, 988, 1998, 4036, 8114, 16289, 32645, 65389, 130887, 261923, 524014, 1048251, 2096753, 4193832, 8388034, 16776544, 33553622, 67107919, 134216597, 268434140, 536869355, 1073740012, 2147481511, 4294964834, 8589931700
Offset: 0

Views

Author

Gus Wiseman, Aug 24 2023

Keywords

Comments

Also subsets of {1..n} containing n whose greatest element cannot be written as a positive linear combination of the others.

Examples

			The subset {3,4,10} has 10 = 2*3 + 1*4 so is not counted under a(10).
The a(0) = 0 through a(5) = 11 subsets:
  .  {1}  {2}  {3}    {4}        {5}
               {2,3}  {3,4}      {2,5}
                      {2,3,4}    {3,5}
                      {1,2,3,4}  {4,5}
                                 {2,4,5}
                                 {3,4,5}
                                 {1,2,3,5}
                                 {1,2,4,5}
                                 {1,3,4,5}
                                 {2,3,4,5}
                                 {1,2,3,4,5}
		

Crossrefs

The nonempty case is A070880.
The nonnegative version is A124506, first differences of A326083.
The binary version is A288728, first differences of A007865.
A subclass is A341507.
The complement is counted by A365042, first differences of A365043.
First differences of A365044.
The nonnegative complement is A365046, first differences of A364914.
The binary complement is A365070, first differences of A093971.
Without re-usable parts we have A365071, first differences of A151897.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&And@@Table[combp[#[[k]],Union[Delete[#,k]]]=={},{k,Length[#]}]&]],{n,0,10}]

Formula

a(n) = A070880(n) + 1 for n > 0.

A365044 Number of subsets of {1..n} whose greatest element cannot be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

1, 2, 3, 5, 9, 20, 43, 96, 207, 442, 925, 1913, 3911, 7947, 16061, 32350, 64995, 130384, 261271, 523194, 1047208, 2095459, 4192212, 8386044, 16774078, 33550622, 67104244, 134212163, 268428760, 536862900, 1073732255, 2147472267, 4294953778, 8589918612, 17179850312
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

Sets of this type may be called "positive combination-free".
Also subsets of {1..n} such that no element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,5,6,8} has 6 = 2*3 + 0*5 + 0*8 and 8 = 1*3 + 1*5 + 0*6 but neither of these is strictly positive, so S is counted under a(8).
The a(0) = 1 through a(5) = 20 subsets:
  {}  {}   {}   {}     {}         {}
      {1}  {1}  {1}    {1}        {1}
           {2}  {2}    {2}        {2}
                {3}    {3}        {3}
                {2,3}  {4}        {4}
                       {2,3}      {5}
                       {3,4}      {2,3}
                       {2,3,4}    {2,5}
                       {1,2,3,4}  {3,4}
                                  {3,5}
                                  {4,5}
                                  {2,3,4}
                                  {2,4,5}
                                  {3,4,5}
                                  {1,2,3,4}
                                  {1,2,3,5}
                                  {1,2,4,5}
                                  {1,3,4,5}
                                  {2,3,4,5}
                                  {1,2,3,4,5}
		

Crossrefs

The binary version is A007865, first differences A288728.
The binary complement is A093971, first differences A365070.
Without re-usable parts we have A151897, first differences A365071.
The nonnegative version is A326083, first differences A124506.
A subclass is A341507.
The nonnegative complement is A364914, first differences A365046.
The complement is counted by A365043, first differences A365042.
First differences are A365045.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],And@@Table[combp[Last[#],Union[Most[#]]]=={},{k,Length[#]}]&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365044(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return n+1+sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] not in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365043(n).

Extensions

a(15)-a(34) from Chai Wah Wu, Nov 20 2023
Showing 1-10 of 14 results. Next