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

A088571 a(n) = A088314(n) - A000009(n).

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 6, 7, 12, 14, 20, 25, 36, 43, 57, 69, 92, 110, 140, 168, 211, 250, 311, 369, 453, 531, 646, 754, 910, 1061, 1262, 1473, 1748, 2015, 2381, 2738, 3214, 3701, 4313, 4935, 5734, 6558, 7568, 8641, 9950, 11286, 12977, 14719, 16822, 19043, 21702
Offset: 0

Views

Author

Naohiro Nomoto, Nov 17 2003

Keywords

Extensions

Corrected and extended by Alois P. Heinz, Aug 09 2012

A056239 If n = Product_{k >= 1} (p_k)^(c_k) where p_k is k-th prime and c_k >= 0 then a(n) = Sum_{k >= 1} k*c_k.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 6, 5, 5, 4, 7, 5, 8, 5, 6, 6, 9, 5, 6, 7, 6, 6, 10, 6, 11, 5, 7, 8, 7, 6, 12, 9, 8, 6, 13, 7, 14, 7, 7, 10, 15, 6, 8, 7, 9, 8, 16, 7, 8, 7, 10, 11, 17, 7, 18, 12, 8, 6, 9, 8, 19, 9, 11, 8, 20, 7, 21, 13, 8, 10, 9, 9, 22, 7, 8, 14, 23, 8, 10, 15, 12, 8, 24, 8, 10
Offset: 1

Views

Author

Leroy Quet, Aug 19 2000

Keywords

Comments

A pseudo-logarithmic function in the sense that a(b*c) = a(b)+a(c) and so a(b^c) = c*a(b) and f(n) = k^a(n) is a multiplicative function. [Cf. A248692 for example.] Essentially a function from the positive integers onto the partitions of the nonnegative integers (1->0, 2->1, 3->2, 4->1+1, 5->3, 6->1+2, etc.) so each value a(n) appears A000041(a(n)) times, first with the a(n)-th prime and last with the a(n)-th power of 2. Produces triangular numbers from primorials. - Henry Bottomley, Nov 22 2001
Michael Nyvang writes (May 08 2006) that the Danish composer Karl Aage Rasmussen discovered this sequence in the 1990's: it has excellent musical properties.
All A000041(a(n)) different n's with the same value a(n) are listed in row a(n) of triangle A215366. - Alois P. Heinz, Aug 09 2012
a(n) is the sum of the parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} (p_j-th prime) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(33) = 7 because the partition with Heinz number 33 = 3 * 11 is [2,5]. - Emeric Deutsch, May 19 2015

Examples

			a(12) = 1*2 + 2*1 = 4, since 12 = 2^2 *3^1 = (p_1)^2 *(p_2)^1.
		

Crossrefs

Programs

  • Haskell
    a056239 n = sum $ zipWith (*) (map a049084 $ a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, Apr 27 2013
    
  • Maple
    # To get 10000 terms. First make prime table: M:=10000; pl:=array(1..M); for i from 1 to M do pl[i]:=0; od: for i from 1 to M do if ithprime(i) > M then break; fi; pl[ithprime(i)]:=i; od:
    # Decode Maple's amazing syntax for factoring integers: g:=proc(n) local e,p,t1,t2,t3,i,j,k; global pl; t1:=ifactor(n); t2:=nops(t1); if t2 = 2 and whattype(t1) <> `*` then p:=op(1,op(1,t1)); e:=op(2,t1); t3:=pl[p]*e; else
    t3:=0; for i from 1 to t2 do j:=op(i,t1); if nops(j) = 1 then e:=1; p:=op(1,j); else e:=op(2,j); p:=op(1,op(1,j)); fi; t3:=t3+pl[p]*e; od: fi; t3; end; # N. J. A. Sloane, May 10 2006
    A056239 := proc(n) add( numtheory[pi](op(1,p))*op(2,p), p = ifactors(n)[2]) ; end proc: # R. J. Mathar, Apr 20 2010
    # alternative:
    with(numtheory): a := proc (n) local B: B := proc (n) local nn, j, m: nn := op(2, ifactors(n)): for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: add(B(n)[i], i = 1 .. nops(B(n))) end proc: seq(a(n), n = 1 .. 130); # Emeric Deutsch, May 19 2015
  • Mathematica
    a[1] = 0; a[2] = 1; a[p_?PrimeQ] := a[p] = PrimePi[p];
    a[n_] := a[n] = Total[#[[2]]*a[#[[1]]] & /@ FactorInteger[n]]; a /@ Range[91] (* Jean-François Alcover, May 19 2011 *)
    Table[Total[FactorInteger[n] /. {p_, c_} /; p > 0 :> PrimePi[p] c], {n, 91}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    A056239(n) = if(1==n,0,my(f=factor(n)); sum(i=1, #f~, f[i,2] * primepi(f[i,1]))); \\ Antti Karttunen, Oct 26 2014, edited Jan 13 2020
    
  • Python
    from sympy import primepi, factorint
    def A056239(n): return sum(primepi(p)*e for p, e in factorint(n).items()) # Chai Wah Wu, Jan 01 2023
  • Scheme
    (require 'factor) ;; Uses the function factor available in Aubrey Jaffer's SLIB Scheme library.
    (define (A056239 n) (apply + (map A049084 (factor n))))
    ;; Antti Karttunen, Oct 26 2014
    

Formula

Totally additive with a(p) = PrimePi(p), where PrimePi(n) = A000720(n).
a(n) = Sum_{k=1..A001221(n)} A049084(A027748(k))*A124010(k). - Reinhard Zumkeller, Apr 27 2013
From Antti Karttunen, Oct 11 2014: (Start)
a(n) = n - A178503(n).
a(n) = A161511(A156552(n)).
a(n) = A227183(A243354(n)).
For all n >= 0:
a(A002110(n)) = A000217(n). [Cf. Henry Bottomley's comment above.]
a(A005940(n+1)) = A161511(n).
a(A243353(n)) = A227183(n).
Also, for all n >= 1:
a(A241909(n)) = A243503(n).
a(A122111(n)) = a(n).
a(A242424(n)) = a(n).
A248692(n) = 2^a(n). (End)
a(n) < A329605(n), a(n) = A001222(A108951(n)), a(A329902(n)) = A112778(n). - Antti Karttunen, Jan 14 2020

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

Original entry on oeis.org

1, 1, 3, 6, 14, 26, 60, 112, 244, 480, 992, 1944, 4048, 7936, 16176, 32320, 65088, 129504, 261248, 520448, 1046208, 2090240, 4186624, 8365696, 16766464, 33503744, 67064064, 134113280, 268347392, 536546816, 1073575936, 2146703360, 4294425600, 8588476416, 17178349568
Offset: 0

Views

Author

Gus Wiseman, Sep 01 2023

Keywords

Examples

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

Crossrefs

The case of positive coefficients is A088314.
The case of subsets containing n is A131577.
The binary version is A365314, positive A365315.
The binary complement is A365320, positive A365321.
The positive complement is counted by A365322.
A version for partitions is A365379, strict A365311.
The complement is counted by A365380.
The case of subsets without n is A365542.
A326083 and A124506 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]],combs[n,#]!={}&]],{n,0,5}]
  • PARI
    a(n)={
      my(comb(k,b)=while(b>>k, b=bitor(b, b>>k); k*=2); b);
      my(recurse(k,b)=
        if(bittest(b,0), 2^(n+1-k),
        if(2*k>n, 2^(n+1-k) - 2^sum(j=k, n, !bittest(b,j)),
        self()(k+1, b) + self()(k+1, comb(k,b)) )));
      recurse(1, 1<Andrew Howroyd, Sep 04 2023

Extensions

Terms a(12) and beyond from Andrew Howroyd, Sep 04 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

A367218 Number of integer partitions of n whose length can be written as a nonnegative linear combination of the distinct parts.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 8, 13, 18, 26, 35, 50, 66, 92, 119, 160, 208, 275, 350, 457, 579, 742, 933, 1185, 1476, 1859, 2300, 2868, 3531, 4371, 5343, 6575, 8003, 9776, 11842, 14394, 17351, 20987, 25191, 30315, 36257, 43448, 51753, 61776, 73342, 87192, 103184, 122253, 144211
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Comments

The Heinz numbers of these partitions are given by A367226.

Examples

			The partition (4,2,1) has 3 = (2)+(1) or 3 = (1+1+1) so is counted under a(7).
The a(1) = 1 through a(7) = 13 partitions:
  (1)  (11)  (21)   (22)    (32)     (42)      (52)
             (111)  (31)    (41)     (51)      (61)
                    (211)   (221)    (321)     (322)
                    (1111)  (311)    (411)     (331)
                            (2111)   (2211)    (421)
                            (11111)  (3111)    (511)
                                     (21111)   (2221)
                                     (111111)  (3211)
                                               (4111)
                                               (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
		

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 integer partitions, strict A000009.
A002865 counts partitions whose length is a part, complement A229816.
A008284 counts partitions by length, strict A008289.
A240855 counts strict partitions whose length is a part, complement A240861.
A365046 counts combination-full subsets, differences of A364914.

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[IntegerPartitions[n], combs[Length[#], Union[#]]!={}&]], {n,0,15}]

Extensions

a(31)-a(48) from Chai Wah Wu, Nov 15 2023

A367219 Number of integer partitions of n whose length cannot be written as a nonnegative linear combination of the distinct parts.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 3, 2, 4, 4, 7, 6, 11, 9, 16, 16, 23, 22, 35, 33, 48, 50, 69, 70, 99, 99, 136, 142, 187, 194, 261, 267, 346, 367, 468, 489, 626, 650, 824, 870, 1081, 1135, 1421, 1485, 1833, 1942, 2374, 2501, 3062, 3220, 3915, 4145, 4987, 5274, 6363, 6709, 8027
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Examples

			3 cannot be written as a nonnegative linear combination of 2 and 5, so (5,2,2) is counted under a(9).
The a(2) = 1 through a(10) = 7 partitions:
  (2)  (3)  (4)  (5)  (6)      (7)    (8)      (9)      (10)
                      (3,3)    (4,3)  (4,4)    (5,4)    (5,5)
                      (2,2,2)         (5,3)    (6,3)    (6,4)
                                      (4,2,2)  (5,2,2)  (7,3)
                                                        (4,4,2)
                                                        (6,2,2)
                                                        (2,2,2,2,2)
		

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 integer partitions, strict A000009.
A002865 counts partitions whose length is a part, complement A229816.
A008284 counts partitions by length, strict A008289.
A124506 appears to count combination-free subsets, differences of A326083.
A365046 counts combination-full subsets, differences of A364914.

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[IntegerPartitions[n],combs[Length[#],Union[#]]=={}&]],{n,0,15}]

Extensions

a(31)-a(56) from Chai Wah Wu, Nov 15 2023

A367220 Number of strict integer partitions of n whose length (number of parts) can be written as a nonnegative linear combination of the parts.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 3, 3, 4, 5, 7, 7, 10, 11, 15, 17, 22, 25, 32, 37, 46, 53, 65, 75, 90, 105, 124, 143, 168, 193, 224, 258, 297, 340, 390, 446, 509, 580, 660, 751, 852, 967, 1095, 1240, 1401, 1584, 1786, 2015, 2269, 2554, 2869, 3226, 3617, 4056, 4541, 5084
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Comments

The non-strict version is A367218.

Examples

			The a(3) = 1 through a(10) = 7 strict partitions:
  (2,1)  (3,1)  (3,2)  (4,2)    (5,2)    (6,2)    (7,2)    (8,2)
                (4,1)  (5,1)    (6,1)    (7,1)    (8,1)    (9,1)
                       (3,2,1)  (4,2,1)  (4,3,1)  (4,3,2)  (5,3,2)
                                         (5,2,1)  (5,3,1)  (5,4,1)
                                                  (6,2,1)  (6,3,1)
                                                           (7,2,1)
                                                           (4,3,2,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 integer partitions, strict A000009.
A002865 counts partitions whose length is a part, complement A229816.
A188431 counts complete strict partitions, incomplete A365831.
A240855 counts strict partitions whose length is a part, complement A240861.
A364272 counts sum-full strict partitions, sum-free A364349.
A365046 counts combination-full subsets, differences of A364914.

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[IntegerPartitions[n], UnsameQ@@#&&combs[Length[#], Union[#]]!={}&]], {n,0,15}]

A367221 Number of strict integer partitions of n whose length (number of parts) cannot be written as a nonnegative linear combination of the parts.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 7, 10, 10, 13, 14, 17, 18, 23, 24, 29, 32, 37, 41, 49, 54, 63, 72, 82, 93, 108, 122, 139, 159, 180, 204, 231, 261, 293, 331, 370, 415, 464, 518, 575, 641, 710, 789, 871, 965, 1064, 1177, 1294, 1428, 1569, 1729, 1897
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Comments

The non-strict version is A367219.

Examples

			The a(2) = 1 through a(16) = 10 strict partitions (A..G = 10..16):
  2  3  4  5  6  7   8   9   A   B    C    D    E    F    G
                 43  53  54  64  65   75   76   86   87   97
                         63  73  74   84   85   95   96   A6
                                 83   93   94   A4   A5   B5
                                 542  642  A3   B3   B4   C4
                                           652  752  C3   D3
                                           742  842  654  754
                                                     762  862
                                                     852  952
                                                     942  A42
		

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 integer partitions, strict A000009.
A002865 counts partitions whose length is a part, complement A229816.
A124506 appears to count combination-free subsets, differences of A326083.
A188431 counts complete strict partitions, incomplete A365831.
A240855 counts strict partitions whose length is a part, complement A240861.
A364272 counts sum-full strict partitions, sum-free A364349.
Triangles:
A008284 counts partitions by length, strict A008289.
A046663 counts partitions of n without a subset-sum k, strict A365663.
A365541 counts subsets containing two distinct elements summing to k.
A365658 counts partitions by number of subset-sums, strict A365832.

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[IntegerPartitions[n], UnsameQ@@#&&combs[Length[#], Union[#]]=={}&]], {n,0,30}]

A367222 Number of subsets of {1..n} whose cardinality can be written as a nonnegative linear combination of the elements.

Original entry on oeis.org

1, 2, 3, 6, 12, 24, 49, 101, 207, 422, 859, 1747, 3548, 7194, 14565, 29452, 59496, 120086, 242185, 488035, 982672, 1977166, 3975508, 7989147, 16047464, 32221270, 64674453, 129775774, 260337978, 522124197, 1046911594, 2098709858, 4206361369, 8429033614, 16887728757, 33829251009, 67755866536, 135687781793, 271693909435
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Examples

			The set {1,2,4} has 3 = (2)+(1) or 3 = (1+1+1) so is counted under a(4).
The a(0) = 1 through a(4) = 12 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {1,2}  {1,2}    {1,2}
                  {1,3}    {1,3}
                  {2,3}    {1,4}
                  {1,2,3}  {2,3}
                           {2,4}
                           {1,2,3}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
		

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
-------------------------------------------
A002865 counts partitions whose length is a part, complement A229816.
A007865/A085489/A151897 count certain types of sum-free subsets.
A088809/A093971/A364534 count certain types of sum-full subsets.
A124506 appears to count combination-free subsets, differences of A326083.
A326020 counts complete subsets.
A365046 counts combination-full subsets, differences of A364914.
Triangles:
A008284 counts partitions by length, strict A008289.
A365381 counts sets with a subset summing to k, without A366320.
A365541 counts subsets containing two distinct elements summing to k.

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]], combs[Length[#], Union[#]]!={}&]], {n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A367222(n):
        c, mlist = 1, []
        for m in range(1,n+1):
            t = set()
            for p in partitions(m):
                t.add(tuple(sorted(p.keys())))
            mlist.append([set(d) for d in t])
        for k in range(1,n+1):
            for w in combinations(range(1,n+1),k):
                ws = set(w)
                for s in mlist[k-1]:
                    if s <= ws:
                        c += 1
                        break
        return c # Chai Wah Wu, Nov 16 2023

Formula

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

Extensions

a(13)-a(33) from Chai Wah Wu, Nov 15 2023
a(34)-a(38) from Max Alekseyev, Feb 25 2025

A367223 Number of subsets of {1..n} whose cardinality cannot be written as a nonnegative linear combination of the elements.

Original entry on oeis.org

0, 0, 1, 2, 4, 8, 15, 27, 49, 90, 165, 301, 548, 998, 1819, 3316, 6040, 10986, 19959, 36253, 65904, 119986, 218796, 399461, 729752, 1333162, 2434411, 4441954, 8097478, 14746715, 26830230, 48773790, 88605927, 160900978, 292140427, 530487359, 963610200, 1751171679, 3183997509
Offset: 0

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Examples

			3 cannot be written as a nonnegative linear combination of 2, 4, and 5, so {2,4,5} is counted under a(6).
The a(2) = 1 through a(6) = 15 subsets:
  {2}  {2}  {2}    {2}      {2}
       {3}  {3}    {3}      {3}
            {4}    {4}      {4}
            {3,4}  {5}      {5}
                   {3,4}    {6}
                   {3,5}    {3,4}
                   {4,5}    {3,5}
                   {2,4,5}  {3,6}
                            {4,5}
                            {4,6}
                            {5,6}
                            {2,4,5}
                            {2,4,6}
                            {2,5,6}
                            {4,5,6}
		

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
-------------------------------------------
A007865/A085489/A151897 count certain types of sum-free subsets.
A088809/A093971/A364534 count certain types of sum-full subsets.
A124506 appears to count combination-free subsets, differences of A326083.
A365046 counts combination-full subsets, differences of A364914.
Triangles:
A116861 counts positive linear combinations of strict partitions of k.
A364916 counts linear combinations of strict partitions of k.
A366320 counts subsets without a subset summing to k, with A365381.

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]], combs[Length[#],Union[#]]=={}&]], {n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A367223(n):
        c, mlist = 0, []
        for m in range(1,n+1):
            t = set()
            for p in partitions(m):
                t.add(tuple(sorted(p.keys())))
            mlist.append([set(d) for d in t])
        for k in range(1,n+1):
            for w in combinations(range(1,n+1),k):
                ws = set(w)
                for s in mlist[k-1]:
                    if s <= ws:
                        break
                else:
                    c += 1
        return c # Chai Wah Wu, Nov 16 2023

Formula

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

Extensions

a(14)-a(33) from Chai Wah Wu, Nov 15 2023
a(34)-a(38) from Max Alekseyev, Feb 25 2025
Showing 1-10 of 33 results. Next