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 11 results. Next

A088314 Cardinality of set of sets of parts of all partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 12, 18, 22, 30, 37, 51, 61, 79, 96, 124, 148, 186, 222, 275, 326, 400, 473, 575, 673, 811, 946, 1132, 1317, 1558, 1813, 2138, 2463, 2893, 3323, 3882, 4461, 5177, 5917, 6847, 7818, 8994, 10251, 11766, 13334, 15281, 17309, 19732, 22307
Offset: 0

Views

Author

Naohiro Nomoto, Nov 05 2003

Keywords

Comments

Number of different values of A007947(m) when A056239(m) is equal to n.
From Gus Wiseman, Sep 11 2023: (Start)
Also the number of finite sets of positive integers that can be linearly combined using all positive coefficients to obtain n. For example, the a(1) = 1 through a(7) = 12 sets are:
{1} {1} {1} {1} {1} {1} {1}
{2} {3} {2} {5} {2} {7}
{1,2} {4} {1,2} {3} {1,2}
{1,2} {1,3} {6} {1,3}
{1,3} {1,4} {1,2} {1,4}
{2,3} {1,3} {1,5}
{1,4} {1,6}
{1,5} {2,3}
{2,4} {2,5}
{1,2,3} {3,4}
{1,2,3}
{1,2,4}
(End)

Examples

			The 7 partitions of 5 and their sets of parts are
[ #]  partition      set of parts
[ 1]  [ 1 1 1 1 1 ]  {1}
[ 2]  [ 2 1 1 1 ]    {1, 2}
[ 3]  [ 2 2 1 ]      {1, 2}  (same as before)
[ 4]  [ 3 1 1 ]      {1, 3}
[ 5]  [ 3 2 ]        {2, 3}
[ 6]  [ 4 1 ]        {1, 4}
[ 7]  [ 5 ]          {5}
so we have a(5) = |{{1}, {1, 2}, {1, 3}, {2, 3}, {1, 4}, {5}}| = 6.
		

Crossrefs

Cf. A182410.
The complement in subsets of {1..n-1} is A070880(n) = A365045(n) - 1.
The case of pairs is A365315, see also A365314, A365320, A365321.
A116861 and A364916 count linear combinations of strict partitions.
A179822 and A326080 count sum-closed subsets.
A326083 and A124506 appear to count combination-free subsets.
A364914 and A365046 count combination-full subsets.

Programs

  • Haskell
    a066186 = sum . concat . ps 1 where
       ps _ 0 = [[]]
       ps i j = [t:ts | t <- [i..j], ts <- ps t (j - t)]
    -- Reinhard Zumkeller, Jul 13 2013
    
  • Maple
    list2set := L -> {op(L)};
    a:= N -> list2set(map( list2set, combinat[partition](N) ));
    seq(nops(a(n)), n=0..30);
    #  Yogy Namara (yogy.namara(AT)gmail.com), Jan 13 2010
    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-> nops(b(n, n)):
    seq(a(n), n=0..40);
    # Alois P. Heinz, Aug 09 2012
  • Mathematica
    Table[Length[Union[Map[Union,IntegerPartitions[n]]]],{n,1,30}] (* Geoffrey Critzer, Feb 19 2013 *)
    (* Second program: *)
    b[n_, i_] := b[n, i] = If[n == 0, {{}}, If[i < 1, {},
         Union@Flatten@{b[n, i - 1], Table[If[Head[#] == List,
         Append[#, i]]& /@ b[n - i*j, i - 1], {j, 1, n/i}]}]];
    a[n_] := Length[b[n, n]];
    a /@ Range[0, 40] (* Jean-François Alcover, Jun 04 2021, after Alois P. Heinz *)
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y}, {i,1,Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
    Table[Length[Select[Join@@Array[IntegerPartitions,n], UnsameQ@@#&&combp[n,#]!={}&]], {n,0,15}] (* Gus Wiseman, Sep 11 2023 *)
  • Python
    from sympy.utilities.iterables import partitions
    def A088314(n): return len({tuple(sorted(set(p))) for p in partitions(n)}) # Chai Wah Wu, Sep 10 2023

Formula

a(n) = 2^(n-1) - A070880(n). - Alois P. Heinz, Feb 08 2019
a(n) = A365042(n) + 1. - Gus Wiseman, Sep 13 2023

Extensions

More terms and clearer definition from Vladeta Jovovic, Apr 21 2005

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).

A367213 Number of integer partitions of n whose length (number of parts) is not equal to the sum of any submultiset.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 5, 4, 7, 8, 12, 13, 19, 21, 29, 33, 45, 49, 67, 73, 97, 108, 139, 152, 196, 217, 274, 303, 379, 420, 523, 579, 709, 786, 960, 1061, 1285, 1423, 1714, 1885, 2265, 2498, 2966, 3280, 3881, 4268, 5049, 5548, 6507, 7170, 8391, 9194, 10744, 11778, 13677
Offset: 0

Views

Author

Gus Wiseman, Nov 12 2023

Keywords

Comments

These partitions are necessarily incomplete (A365924).
Are there any decreases after the initial terms?

Examples

			The a(3) = 1 through a(9) = 8 partitions:
  (3)  (4)    (5)    (6)      (7)      (8)        (9)
       (3,1)  (4,1)  (3,3)    (4,3)    (4,4)      (5,4)
                     (5,1)    (6,1)    (5,3)      (6,3)
                     (2,2,2)  (5,1,1)  (7,1)      (8,1)
                     (4,1,1)           (4,2,2)    (4,4,1)
                                       (6,1,1)    (5,2,2)
                                       (5,1,1,1)  (7,1,1)
                                                  (6,1,1,1)
		

Crossrefs

The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum or linear combination of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free
-------------------------------------------
A000041 counts partitions, strict A000009.
A002865 counts partitions whose length is a part, complement A229816.
A007865/A085489/A151897 count certain types of sum-free subsets.
A108917 counts knapsack partitions, non-knapsack A366754.
A126796 counts complete partitions, incomplete A365924.
A237667 counts sum-free partitions, sum-full A237668.
A304792 counts subset-sums of partitions, strict A365925.
Triangles:
A008284 counts partitions by length, strict A008289.
A046663 counts partitions of n without a subset-sum k, strict A365663.
A365543 counts partitions of n with a subset-sum k, strict A365661.
A365658 counts partitions by number of subset-sums, strict A365832.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], FreeQ[Total/@Subsets[#], Length[#]]&]], {n,0,10}]

Extensions

a(41)-a(54) from Chai Wah Wu, Nov 13 2023

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

Original entry on oeis.org

1, 1, 2, 2, 6, 4, 16, 12, 32, 32, 104, 48, 256, 208, 448, 448, 1568, 896, 3840, 2368, 6912, 7680, 22912, 10752, 50688, 44800, 104448, 88064, 324096, 165888, 780288, 541696, 1458176, 1519616, 4044800, 2220032, 10838016, 8744960, 20250624, 16433152, 62267392, 34865152
Offset: 1

Views

Author

Gus Wiseman, Sep 04 2023

Keywords

Examples

			The set {4,5,6} cannot be linearly combined to obtain 7 so is counted under a(7), but we have 8 = 2*4 + 0*5 + 0*6, so it is not counted under a(8).
The a(1) = 1 through a(8) = 12 subsets:
  {}  {}  {}   {}   {}     {}     {}       {}
          {2}  {3}  {2}    {4}    {2}      {3}
                    {3}    {5}    {3}      {5}
                    {4}    {4,5}  {4}      {6}
                    {2,4}         {5}      {7}
                    {3,4}         {6}      {3,6}
                                  {2,4}    {3,7}
                                  {2,6}    {5,6}
                                  {3,5}    {5,7}
                                  {3,6}    {6,7}
                                  {4,5}    {3,6,7}
                                  {4,6}    {5,6,7}
                                  {5,6}
                                  {2,4,6}
                                  {3,5,6}
                                  {4,5,6}
		

Crossrefs

The complement is counted by A365073, without n A365542.
The binary complement is A365314, positive A365315.
The binary case is A365320, positive A365321.
For positive coefficients we have A365322, complement A088314.
A124506 appears to count combination-free subsets, differences of A326083.
A179822 counts sum-closed subsets, first differences of A326080.
A288728 counts binary sum-free subsets, first differences of A007865.
A365046 counts combination-full subsets, first differences of A364914.
A365071 counts sum-free subsets, first differences of A151897.

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-1]],combs[n,#]=={}&]],{n,5}]

Formula

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

Extensions

Terms a(12) and beyond from Andrew Howroyd, Sep 04 2023

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

A088528 Let m = number of ways of partitioning n into parts using all the parts of a subset of {1, 2, ..., n-1} whose sum of all parts of a subset is less than n; a(n) gives number of different subsets of {1, 2, ..., n-1} whose m is 0.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 6, 6, 10, 12, 17, 18, 26, 30, 40, 44, 58, 66, 84, 95, 120, 135, 166, 186, 230, 257, 314, 350, 421, 476, 561, 626, 749, 831, 986, 1095, 1276, 1424, 1666, 1849, 2138, 2388, 2741, 3042, 3522, 3879, 4441, 4928, 5617, 6222, 7084, 7802, 8852, 9800
Offset: 1

Views

Author

Naohiro Nomoto, Nov 16 2003

Keywords

Comments

Note that {2, 3} is counted for n = 6 because although 6 = 2+2+2 = 3+3, there is no partition that includes both 2 and 3. - David Wasserman, Aug 09 2005
Said differently, a(n) is the number of finite nonempty sets of positive integers with sum < n that cannot be linearly combined using all positive coefficients to obtain n. - Gus Wiseman, Sep 10 2023

Examples

			a(5)=3 because there are three different subsets, {2}, {3} & {4}; a(6)=3 because there are three different subsets, {4}, {5} & {2,3}.
From _Gus Wiseman_, Sep 10 2023: (Start)
The set {3,5} is not counted under a(8) because 1*3 + 1*5 = 8, but it is counted under a(9) and a(10), and it is not counted under a(11) because 2*3 + 1*5 = 11.
The a(3) = 1 through a(11) = 17 subsets:
  {2}  {3}  {2}  {4}    {2}    {3}    {2}    {3}      {2}
            {3}  {5}    {3}    {5}    {4}    {4}      {3}
            {4}  {2,3}  {4}    {6}    {5}    {6}      {4}
                        {5}    {7}    {6}    {7}      {5}
                        {6}    {2,5}  {7}    {8}      {6}
                        {2,4}  {3,4}  {8}    {9}      {7}
                                      {2,4}  {2,5}    {8}
                                      {2,6}  {2,7}    {9}
                                      {3,4}  {3,5}    {10}
                                      {3,5}  {3,6}    {2,4}
                                             {4,5}    {2,6}
                                             {2,3,4}  {2,8}
                                                      {3,6}
                                                      {3,7}
                                                      {4,5}
                                                      {4,6}
                                                      {2,3,5}
(End)
		

Crossrefs

The complement is A088571, allowing sum n A088314.
For sets with max < n instead of sum < n we have A365045, nonempty A070880.
For nonnegative coefficients we have A365312, complement A365311.
For sets with max <= n we have A365322.
For partitions we have A365323, nonnegative A365378.
A116861 and A364916 count linear combinations of strict partitions.
A326083 and A124506 appear to count combination-free subsets.

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[Select[Subsets[Range[n]],0Gus Wiseman, Sep 12 2023 *)

Extensions

More terms from David Wasserman, Aug 09 2005

A070880 Consider the 2^(n-1)-1 nonempty subsets S of {1, 2, ..., n-1}; a(n) gives number of such S for which it is impossible to partition n into parts from S such that each s in S is used at least once.

Original entry on oeis.org

0, 0, 1, 3, 10, 22, 52, 110, 234, 482, 987, 1997, 4035, 8113, 16288, 32644, 65388, 130886, 261922, 524013, 1048250, 2096752, 4193831, 8388033, 16776543, 33553621, 67107918, 134216596, 268434139, 536869354, 1073740011, 2147481510, 4294964833, 8589931699
Offset: 1

Views

Author

Naohiro Nomoto, Nov 16 2003

Keywords

Comments

Also the number of nonempty subsets of {1..n-1} that cannot be linearly combined using all positive coefficients to obtain n. - Gus Wiseman, Sep 10 2023

Examples

			a(4)=3 because there are three different subsets S of {1,2,3} satisfying the condition: {3}, {2,3} & {1,2,3}. For the other subsets S, such as {1,2}, there is a partition of 4 which uses them all (such as 4 = 1+1+2).
From _Gus Wiseman_, Sep 10 2023: (Start)
The a(6) = 22 subsets:
  {4}  {2,3}  {1,2,4}  {1,2,3,4}  {1,2,3,4,5}
  {5}  {2,5}  {1,2,5}  {1,2,3,5}
       {3,4}  {1,3,4}  {1,2,4,5}
       {3,5}  {1,3,5}  {1,3,4,5}
       {4,5}  {1,4,5}  {2,3,4,5}
              {2,3,4}
              {2,3,5}
              {2,4,5}
              {3,4,5}
(End)
		

Crossrefs

For sets with sum < n instead of maximum < n we have A088528.
The complement is counted by A365042, including empty set A088314.
Allowing empty sets gives A365045, nonnegative version apparently A124506.
Without re-usable parts we have A365377(n) - 1.
For nonnegative (instead of positive) coefficients we have A365380(n) - 1.
A326083 counts combination-free subsets, complement A364914.
A364350 counts combination-free strict partitions, complement A364913.

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-1]]], combp[n,#]=={}&]],{n,7}] (* Gus Wiseman, Sep 10 2023 *)
  • Python
    from sympy.utilities.iterables import partitions
    def A070880(n): return (1<Chai Wah Wu, Sep 10 2023

Formula

a(n) = 2^(n-1) - A088314(n). - Charlie Neder, Feb 08 2019
a(n) = A365045(n) - 1. - Gus Wiseman, Sep 10 2023

Extensions

Edited by N. J. A. Sloane, Sep 09 2017
a(20)-a(34) from Alois P. Heinz, Feb 08 2019

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

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

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 9, 11, 17, 21, 29, 36, 50, 60, 78, 95, 123, 147, 185, 221, 274, 325, 399, 472, 574, 672, 810, 945, 1131, 1316, 1557, 1812, 2137, 2462, 2892, 3322, 3881, 4460, 5176, 5916, 6846, 7817, 8993, 10250, 11765, 13333, 15280, 17308, 19731, 22306
Offset: 0

Views

Author

Gus Wiseman, Aug 23 2023

Keywords

Comments

Sets of this type may be called "positive combination-full".
Also subsets of {1..n} containing n whose greatest element can be written as a positive linear combination of the others.

Examples

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

Crossrefs

The nonnegative complement is A124506, first differences of A326083.
The binary complement is A288728, first differences of A007865.
First differences of A365043.
The complement is counted by A365045, first differences of A365044.
The nonnegative version is A365046, first differences of A364914.
Without re-usable parts we have A365069, first differences of A364534.
The binary version is A365070, first differences of A093971.
A085489 and A364755 count subsets with no sum of two distinct elements.
A088314 counts sets that can be linearly combined to obtain n.
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[Subsets[Range[n]],MemberQ[#,n]&&Or@@Table[combp[#[[k]],Union[Delete[#,k]]]!={},{k,Length[#]}]&]],{n,0,10}]

Formula

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

A365542 Number of subsets of {1..n-1} that can be linearly combined using nonnegative coefficients to obtain n.

Original entry on oeis.org

0, 1, 2, 6, 10, 28, 48, 116, 224, 480, 920, 2000, 3840, 7984, 15936, 32320, 63968, 130176, 258304, 521920, 1041664, 2089472, 4171392, 8377856, 16726528, 33509632, 67004416, 134129664, 268111360, 536705024, 1072961536, 2146941952, 4293509120, 8588414976
Offset: 1

Views

Author

Gus Wiseman, Sep 09 2023

Keywords

Examples

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

Crossrefs

The case of positive coefficients is A365042, complement A365045.
For subsets of {1..n} instead of {1..n-1} we have A365073.
The binary complement is A365315.
The complement is counted by A365380.
A124506 and A326083 appear to count combination-free subsets.
A179822 and A326080 count sum-closed subsets.
A364350 counts combination-free strict partitions.
A364914 and A365046 count combination-full subsets.

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-1]],combs[n,#]!={}&]],{n,5}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365542(n):
        a = {tuple(sorted(set(p))) for p in partitions(n)}
        return sum(1 for m in range(1,n) for b in combinations(range(1,n),m) if any(set(d).issubset(set(b)) for d in a)) # Chai Wah Wu, Sep 12 2023

Extensions

More terms from Alois P. Heinz, Sep 13 2023
Showing 1-10 of 11 results. Next