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.

Previous Showing 11-20 of 51 results. Next

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

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

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

A367224 Numbers m with a divisor whose prime indices sum to bigomega(m).

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 12, 15, 16, 18, 20, 21, 24, 30, 32, 33, 36, 39, 40, 42, 45, 48, 50, 51, 54, 56, 57, 60, 64, 66, 69, 70, 72, 75, 78, 80, 81, 84, 87, 90, 93, 96, 100, 102, 105, 108, 110, 111, 112, 114, 120, 123, 125, 126, 128, 129, 130, 132, 135, 138, 140, 141
Offset: 1

Views

Author

Gus Wiseman, Nov 14 2023

Keywords

Comments

Also numbers m whose prime indices have a submultiset summing to bigomega(m).
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
These are the Heinz numbers of the partitions counted by A367212.

Examples

			The prime indices of 24 are {1,1,1,2} with submultiset {1,1,2} summing to 4, so 24 is in the sequence.
The terms together with their prime indices begin:
    1: {}
    2: {1}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
    9: {2,2}
   12: {1,1,2}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   24: {1,1,1,2}
   30: {1,2,3}
   32: {1,1,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
-------------------------------------------
A000700 counts self-conjugate partitions, ranks A088902.
A002865 counts partitions whose length is a part, ranks A325761.
A005117 ranks strict integer partitions, counted by A000009.
A066208 ranks partitions into odd parts, also counted by A000009.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A126796 counts complete partitions, ranks A325781.
A229816 counts partitions whose length is not a part, ranks A367107.
A237668 counts sum-full partitions, ranks A364532.
Triangles:
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
    prix[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p], {k}]]]];
    Select[Range[100], MemberQ[Total/@prix/@Divisors[#], PrimeOmega[#]]&]

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

A363226 Number of strict integer partitions of n containing some three possibly equal parts (a,b,c) such that a + b = c. A variation of sum-full strict partitions.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 1, 2, 3, 5, 4, 6, 7, 11, 11, 16, 18, 26, 29, 34, 42, 51, 62, 72, 84, 101, 119, 142, 166, 191, 226, 262, 300, 354, 405, 467, 540, 623, 705, 807, 927, 1060, 1206, 1369, 1551, 1760, 1998, 2248, 2556, 2861, 3236, 3628, 4100, 4587, 5152, 5756
Offset: 0

Views

Author

Gus Wiseman, Jul 19 2023

Keywords

Comments

Note that, by this definition, the partition (2,1) is sum-full, because (1,1,2) is a triple satisfying a + b = c.

Examples

			The a(3) = 1 through a(15) = 11 partitions (A=10, B=11, C=12):
  21  .  .  42   421  431  63   532   542   84    643   653   A5
            321       521  432  541   632   642   742   743   843
                           621  631   821   651   841   752   942
                                721   5321  921   A21   761   C21
                                4321        5421  5431  842   6432
                                            6321  6421  B21   6531
                                                  7321  5432  7431
                                                        6431  7521
                                                        6521  8421
                                                        7421  9321
                                                        8321  54321
		

Crossrefs

For subsets of {1..n} we have A093971 (sum-full sets), complement A007865.
The non-strict version is A363225, ranks A364348 (complement A364347).
The complement is counted by A364346, non-strict A364345.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A236912 counts sum-free partitions not re-using parts, complement A237113.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Select[Tuples[#,3],#[[1]]+#[[2]]==#[[3]]&]!={}&]],{n,0,30}]
  • Python
    from itertools import combinations_with_replacement
    from collections import Counter
    from sympy.utilities.iterables import partitions
    def A363226(n): return sum(1 for p in partitions(n) if max(p.values(),default=0)==1 and any(q[0]+q[1]==q[2] for q in combinations_with_replacement(sorted(Counter(p).elements()),3))) # Chai Wah Wu, Sep 20 2023

Extensions

a(31)-a(56) from Chai Wah Wu, Sep 20 2023

A367212 Number of integer partitions of n whose length (number of parts) is equal to the sum of some submultiset.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 11, 15, 22, 30, 43, 58, 80, 106, 143, 186, 248, 318, 417, 530, 684, 863, 1103, 1379, 1741, 2162, 2707, 3339, 4145, 5081, 6263, 7640, 9357, 11350, 13822, 16692, 20214, 24301, 29300, 35073, 42085, 50208, 59981, 71294, 84866, 100509, 119206
Offset: 0

Views

Author

Gus Wiseman, Nov 11 2023

Keywords

Comments

Or, partitions whose length is a subset-sum of the parts.

Examples

			The partition (3,2,1,1) has submultisets (3,1) or (2,1,1) with sum 4, so is counted under a(7).
The a(1) = 1 through a(8) = 15 partitions:
  (1)  (11)  (21)   (22)    (32)     (42)      (52)       (62)
             (111)  (211)   (221)    (321)     (322)      (332)
                    (1111)  (311)    (2211)    (331)      (431)
                            (2111)   (3111)    (421)      (521)
                            (11111)  (21111)   (2221)     (2222)
                                     (111111)  (3211)     (3221)
                                               (4111)     (3311)
                                               (22111)    (4211)
                                               (31111)    (22211)
                                               (211111)   (32111)
                                               (1111111)  (41111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

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.
A088809/A093971/A364534 count certain types of sum-full subsets.
A108917 counts knapsack partitions, non-knapsack A366754.
A126796 counts complete partitions, incomplete A365924.
A237668 counts sum-full partitions, sum-free A237667.
A304792 counts subset-sums of partitions, strict A365925.
Triangles:
A008284 counts partitions by length, strict A008289.
A365381 counts sets with a subset summing to k, complement A366320.
A365543 counts partitions of n with a subset-sum k, strict A365661.

Programs

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

A367214 Number of strict integer partitions of n whose length (number of parts) is equal to the sum of some submultiset.

Original entry on oeis.org

1, 1, 0, 1, 0, 1, 2, 2, 3, 4, 5, 5, 7, 8, 10, 12, 14, 17, 21, 25, 30, 36, 43, 51, 60, 71, 83, 97, 113, 132, 153, 178, 205, 238, 272, 315, 360, 413, 471, 539, 613, 698, 792, 899, 1018, 1153, 1302, 1470, 1658, 1867, 2100, 2362, 2652, 2974, 3335, 3734, 4178, 4672
Offset: 0

Views

Author

Gus Wiseman, Nov 12 2023

Keywords

Comments

These partitions have Heinz numbers A367224 /\ A005117.

Examples

			The strict partition (6,4,3,2,1) has submultisets {1,4} and {2,3} with sum 5 so is counted under a(16).
The a(1) = 1 through a(10) = 5 strict partitions:
  (1)  .  (2,1)  .  (3,2)  (4,2)    (5,2)    (6,2)    (7,2)    (8,2)
                           (3,2,1)  (4,2,1)  (4,3,1)  (4,3,2)  (5,3,2)
                                             (5,2,1)  (5,3,1)  (6,3,1)
                                                      (6,2,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.
A088809/A093971/A364534 count certain types of sum-full subsets.
A188431 counts complete strict partitions, incomplete A365831.
A240855 counts strict partitions whose length is a part, complement A240861.
A275972 counts strict knapsack partitions, non-strict A108917.
A364272 counts sum-full strict partitions, sum-free A364349.
A365925 counts subset-sums of strict partitions, non-strict A304792.
Triangles:
A008289 counts strict partitions by length, non-strict A008284.
A365661 counts strict partitions with a subset-sum k, non-strict A365543.
A365832 counts strict partitions by subset-sums, non-strict A365658.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&MemberQ[Total/@Subsets[#], Length[#]]&]], {n,0,30}]

A367216 Number of subsets of {1..n} whose cardinality is equal to the sum of some subset.

Original entry on oeis.org

1, 2, 3, 5, 10, 20, 40, 82, 169, 348, 716, 1471, 3016, 6171, 12605, 25710, 52370, 106539, 216470, 439310, 890550, 1803415, 3648557, 7375141, 14896184, 30065129, 60639954, 122231740, 246239551, 495790161, 997747182, 2006969629, 4035274292, 8110185100, 16293958314, 32724456982
Offset: 0

Views

Author

Gus Wiseman, Nov 12 2023

Keywords

Examples

			The a(0) = 1 through a(4) = 10 subsets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {1,2}  {1,2}    {1,2}
                  {2,3}    {2,3}
                  {1,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
-------------------------------------------
A000009 counts subsets summing to n.
A000124 counts distinct possible sums of subsets of {1..n}.
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.
A237668 counts sum-full partitions, ranks A364532.
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.
Triangles:
A365381 counts sets with a subset summing to k, without A366320.
A365541 counts sets containing two distinct elements summing to k.

Programs

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

Formula

a(n) = 2^n - A367217(n). - Chai Wah Wu, Nov 14 2023

Extensions

a(16)-a(28) from Chai Wah Wu, Nov 14 2023
a(29)-a(35) from Max Alekseyev, Feb 25 2025

A367226 Numbers m whose prime indices have a nonnegative linear combination equal to bigomega(m).

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 56, 57, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 86, 87, 88, 90, 92, 93, 94, 96, 98, 100, 102, 104
Offset: 1

Views

Author

Gus Wiseman, Nov 15 2023

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.
These are the Heinz numbers of the partitions counted by A367218.

Examples

			The prime indices of 24 are {1,1,1,2} with (1+1+1+1) = 4 or (1+1)+(2) = 4 or (2+2) = 4, so 24 is in the sequence.
The terms together with their prime indices begin:
    1: {}
    2: {1}
    4: {1,1}
    6: {1,2}
    8: {1,1,1}
    9: {2,2}
   10: {1,3}
   12: {1,1,2}
   14: {1,4}
   15: {2,3}
   16: {1,1,1,1}
   18: {1,2,2}
   20: {1,1,3}
   21: {2,4}
   22: {1,5}
   24: {1,1,1,2}
   26: {1,6}
   28: {1,1,4}
   30: {1,2,3}
   32: {1,1,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
-------------------------------------------
A000700 counts self-conjugate partitions, ranks A088902.
A002865 counts partitions whose length is a part, ranks A325761.
A005117 ranks strict partitions, counted by A000009.
A046663 counts partitions of n without a subset-sum k, strict A365663.
A066208 ranks partitions into odd parts, counted by A000009.
A088809/A093971/A364534 count certain types of sum-full subsets.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A126796 counts complete partitions, ranks A325781.
A237668 counts sum-full partitions, ranks A364532.
A365046 counts combination-full subsets, differences of A364914.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{}, Flatten[Cases[FactorInteger[n], {p_,k_}:>Table[PrimePi[p],{k}]]]];
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y}, {i,0,Floor[n/k]}]}, Select[Tuples[s], Total[Times@@@#]==n&]];
    Select[Range[100], combs[PrimeOmega[#], Union[prix[#]]]!={}&]
Previous Showing 11-20 of 51 results. Next