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

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

A124506 Number of numerical semigroups with Frobenius number n; that is, numerical semigroups for which the largest integer not belonging to them is n.

Original entry on oeis.org

1, 1, 2, 2, 5, 4, 11, 10, 21, 22, 51, 40, 106, 103, 200, 205, 465, 405, 961, 900, 1828, 1913, 4096, 3578, 8273, 8175, 16132, 16267, 34903, 31822, 70854, 68681, 137391, 140661, 292081, 270258, 591443, 582453, 1156012
Offset: 1

Views

Author

P. A. Garcia-Sanchez (pedro(AT)ugr.es), Dec 18 2006

Keywords

Comments

From Gus Wiseman, Aug 28 2023: (Start)
Appears to be the number of subsets of {1..n} containing n such that no element can be written as a nonnegative linear combination of the others, first differences of A326083. For example, the a(1) = 1 through a(8) = 10 subsets are:
{1} {2} {3} {4} {5} {6} {7} {8}
{2,3} {3,4} {2,5} {4,6} {2,7} {3,8}
{3,5} {5,6} {3,7} {5,8}
{4,5} {4,5,6} {4,7} {6,8}
{3,4,5} {5,7} {7,8}
{6,7} {3,7,8}
{3,5,7} {5,6,8}
{4,5,7} {5,7,8}
{4,6,7} {6,7,8}
{5,6,7} {5,6,7,8}
{4,5,6,7}
Note that these subsets do not all generate numerical semigroups, as their GCD is unrestricted, cf. A358392. The complement is counted by A365046, first differences of A364914.
(End)

Examples

			a(1) = 1 via <2,3> = {0,2,3,4,...}; the largest missing number is 1.
a(2) = 1 via <3,4,5> = {0,3,4,5,...}; the largest missing number is 2.
a(3) = 2 via <2,5> = {0,2,4,5,...}; and <4,5,6,7> = {0,4,5,6,7,...} where in both the largest missing number is 3.
a(4) = 2 via <3,5,7> = {0,3,5,6,7,...} and <5,6,7,8,9> = {5,6,7,8,9,...} where in both the largest missing number is 4.
		

Crossrefs

Cf. A158206. [From Steven Finch, Mar 13 2009]
A288728 counts sum-free sets, first differences of A007865.
A364350 counts combination-free partitions, complement A364839.

Programs

  • GAP
    The sequence was originally generated by a C program and a Haskell script. The sequence can be obtained by using the function NumericalSemigroupsWithFrobeniusNumber included in the numericalsgps GAP package.

A364345 Number of integer partitions of n without any three parts (a,b,c) (repeats allowed) satisfying a + b = c. A variation of sum-free partitions.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 10, 13, 16, 21, 27, 34, 43, 54, 67, 83, 102, 122, 151, 182, 218, 258, 313, 366, 443, 513, 611, 713, 844, 975, 1149, 1325, 1554, 1780, 2079, 2381, 2761, 3145, 3647, 4134, 4767, 5408, 6200, 7014, 8035, 9048, 10320, 11639, 13207, 14836, 16850
Offset: 0

Views

Author

Gus Wiseman, Jul 20 2023

Keywords

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (32)     (33)      (43)       (44)
                    (31)    (41)     (51)      (52)       (53)
                    (1111)  (311)    (222)     (61)       (62)
                            (11111)  (411)     (322)      (71)
                                     (3111)    (331)      (332)
                                     (111111)  (511)      (611)
                                               (4111)     (2222)
                                               (31111)    (3311)
                                               (1111111)  (5111)
                                                          (41111)
                                                          (311111)
                                                          (11111111)
		

Crossrefs

For subsets of {1..n} instead of partitions we have A007865 (sum-free sets), differences A288728.
Without re-using parts we have A236912, complement A237113.
Allowing the sum of any number of parts gives A237667 (cf. A108917).
The complement is counted by A363225, strict A363226, for subsets A093971.
The strict case is A364346.
These partitions have ranks A364347, complement A364348.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Select[Tuples[Union[#],3],#[[1]]+#[[2]]==#[[3]]&]=={}&]],{n,0,30}]

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

A364346 Number of strict integer partitions of n such that there is no ordered triple of parts (a,b,c) (repeats allowed) satisfying a + b = c. A variation of sum-free strict partitions.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 4, 5, 5, 8, 9, 11, 11, 16, 16, 20, 20, 25, 30, 34, 38, 42, 50, 58, 64, 73, 80, 90, 105, 114, 128, 148, 158, 180, 201, 220, 241, 277, 306, 333, 366, 404, 447, 497, 544, 592, 662, 708, 797, 861, 954, 1020, 1131, 1226, 1352, 1456, 1600
Offset: 0

Views

Author

Gus Wiseman, Jul 22 2023

Keywords

Examples

			The a(1) = 1 through a(14) = 11 partitions (A..E = 10..14):
  1   2   3   4    5    6    7    8    9     A    B     C     D     E
              31   32   51   43   53   54    64   65    75    76    86
                   41        52   62   72    73   74    93    85    95
                             61   71   81    82   83    A2    94    A4
                                       531   91   92    B1    A3    B3
                                                  A1    543   B2    C2
                                                  641   732   C1    D1
                                                  731   741   652   851
                                                        831   751   932
                                                              832   941
                                                              931   A31
		

Crossrefs

For subsets of {1..n} we have A007865 (sum-free sets), differences A288728.
For sums of any length > 1 we have A364349, non-strict A237667.
The complement is counted by A363226, non-strict A363225.
The non-strict version is A364345, ranks A364347, complement A364348.
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,15}]
  • Python
    from collections import Counter
    from itertools import combinations_with_replacement
    from sympy.utilities.iterables import partitions
    def A364346(n): return sum(1 for p in partitions(n) if max(p.values(),default=1)==1 and not any(q[0]+q[1]==q[2] for q in combinations_with_replacement(sorted(Counter(p).elements()),3))) # Chai Wah Wu, Sep 20 2023

A365541 Irregular triangle read by rows where T(n,k) is the number of subsets of {1..n} containing two distinct elements summing to k = 3..2n-1.

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 7, 4, 4, 8, 8, 14, 14, 14, 8, 8, 16, 16, 28, 28, 37, 28, 28, 16, 16, 32, 32, 56, 56, 74, 74, 74, 56, 56, 32, 32, 64, 64, 112, 112, 148, 148, 175, 148, 148, 112, 112, 64, 64, 128, 128, 224, 224, 296, 296, 350, 350, 350, 296, 296, 224, 224, 128, 128
Offset: 2

Views

Author

Gus Wiseman, Sep 15 2023

Keywords

Comments

Rows are palindromic.

Examples

			Triangle begins:
    1
    2    2    2
    4    4    7    4    4
    8    8   14   14   14    8    8
   16   16   28   28   37   28   28   16   16
   32   32   56   56   74   74   74   56   56   32   32
Row n = 4 counts the following subsets:
  {1,2}      {1,3}      {1,4}      {2,4}      {3,4}
  {1,2,3}    {1,2,3}    {2,3}      {1,2,4}    {1,3,4}
  {1,2,4}    {1,3,4}    {1,2,3}    {2,3,4}    {2,3,4}
  {1,2,3,4}  {1,2,3,4}  {1,2,4}    {1,2,3,4}  {1,2,3,4}
                        {1,3,4}
                        {2,3,4}
                        {1,2,3,4}
		

Crossrefs

Row lengths are A005408.
The case counting only length-2 subsets is A008967.
Column k = n + 1 appears to be A167762.
The version for all subsets (instead of just pairs) is A365381.
Column k = n is A365544.
A000009 counts subsets summing to n.
A007865/A085489/A151897 count certain types of sum-free subsets.
A046663 counts partitions with no submultiset summing to k, strict A365663.
A093971/A088809/A364534 count certain types of sum-full subsets.
A365543 counts partitions with a submultiset summing to k, strict A365661.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], MemberQ[Total/@Subsets[#,{2}],k]&]], {n,2,11}, {k,3,2n-1}]

A364347 Numbers k > 0 such that if prime(a) and prime(b) both divide k, then prime(a+b) does not.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 64, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85
Offset: 1

Views

Author

Gus Wiseman, Jul 26 2023

Keywords

Comments

Or numbers without any prime index equal to the sum of two others, allowing re-used parts.
Also Heinz numbers of a type of sum-free partitions counted by A364345.

Examples

			We don't have 6 because prime(1), prime(1), and prime(1+1) are all divisors.
The terms together with their prime indices begin:
    1: {}
    2: {1}
    3: {2}
    4: {1,1}
    5: {3}
    7: {4}
    8: {1,1,1}
    9: {2,2}
   10: {1,3}
   11: {5}
   13: {6}
   14: {1,4}
   15: {2,3}
   16: {1,1,1,1}
   17: {7}
   19: {8}
   20: {1,1,3}
		

Crossrefs

Subsets of this type are counted by A007865 (sum-free sets).
Partitions of this type are counted by A364345.
The squarefree case is counted by A364346.
The complement is A364348, counted by A363225.
The non-binary version is counted by A364350.
Without re-using parts we have A364461, counted by A236912.
Without re-using parts we have complement A364462, counted by A237113.
A001222 counts prime indices.
A108917 counts knapsack partitions, ranks A299702.
A112798 lists prime indices, sum A056239.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],Intersection[prix[#],Total/@Tuples[prix[#],2]]=={}&]

A367225 Numbers m without a divisor whose prime indices sum to bigomega(m).

Original entry on oeis.org

3, 5, 7, 10, 11, 13, 14, 17, 19, 22, 23, 25, 26, 27, 28, 29, 31, 34, 35, 37, 38, 41, 43, 44, 46, 47, 49, 52, 53, 55, 58, 59, 61, 62, 63, 65, 67, 68, 71, 73, 74, 76, 77, 79, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 99, 101, 103, 104, 106, 107, 109, 113
Offset: 1

Views

Author

Gus Wiseman, Nov 15 2023

Keywords

Comments

Also numbers m whose prime indices do not 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 A367213.

Examples

			The prime indices of 24 are {1,1,1,2} with submultiset {1,1,2} summing to 4, so 24 is not in the sequence.
The terms together with their prime indices begin:
     3: {2}        29: {10}       58: {1,10}
     5: {3}        31: {11}       59: {17}
     7: {4}        34: {1,7}      61: {18}
    10: {1,3}      35: {3,4}      62: {1,11}
    11: {5}        37: {12}       63: {2,2,4}
    13: {6}        38: {1,8}      65: {3,6}
    14: {1,4}      41: {13}       67: {19}
    17: {7}        43: {14}       68: {1,1,7}
    19: {8}        44: {1,1,5}    71: {20}
    22: {1,5}      46: {1,9}      73: {21}
    23: {9}        47: {15}       74: {1,12}
    25: {3,3}      49: {4,4}      76: {1,1,8}
    26: {1,6}      52: {1,1,6}    77: {4,5}
    27: {2,2,2}    53: {16}       79: {22}
    28: {1,1,4}    55: {3,5}      82: {1,13}
		

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.
A108917 counts knapsack partitions, ranks A299702, strict A275972.
A112798 lists prime indices, reverse A296150, length A001222, sum A056239.
A229816 counts partitions whose length is not a part, ranks A367107.
A237667 counts sum-free partitions, ranks A364531.
A365924 counts incomplete partitions, ranks A365830.
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], FreeQ[Total/@prix/@Divisors[#], PrimeOmega[#]]&]

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

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
Showing 1-10 of 23 results. Next