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-3 of 3 results.

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

A365321 Number of pairs of distinct positive integers <= n that cannot be linearly combined with positive coefficients to obtain n.

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 10, 13, 18, 24, 30, 37, 46, 54, 63, 77, 85, 99, 111, 127, 141, 161, 171, 194, 210, 235, 246, 277, 293, 322, 342, 372, 389, 428, 441, 491, 504, 545, 561, 612, 635, 680, 701, 753, 773, 836, 846, 911, 932, 1000, 1017, 1082, 1103, 1176, 1193
Offset: 0

Views

Author

Gus Wiseman, Sep 06 2023

Keywords

Comments

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

Examples

			For the pair p = (2,3) we have 4 = 2*2 + 0*3, so p is not counted under A365320(4), but it is not possible to write 4 as a positive linear combination of 2 and 3, so p is counted under a(4).
The a(2) = 1 through a(7) = 13 pairs:
  (1,2)  (1,3)  (1,4)  (1,5)  (1,6)  (1,7)
         (2,3)  (2,3)  (2,4)  (2,3)  (2,4)
                (2,4)  (2,5)  (2,5)  (2,6)
                (3,4)  (3,4)  (2,6)  (2,7)
                       (3,5)  (3,4)  (3,5)
                       (4,5)  (3,5)  (3,6)
                              (3,6)  (3,7)
                              (4,5)  (4,5)
                              (4,6)  (4,6)
                              (5,6)  (4,7)
                                     (5,6)
                                     (5,7)
                                     (6,7)
		

Crossrefs

The unrestricted version is A000217, ranks A001358.
For strict partitions we have A088528, complement A088314.
The (binary) complement is A365315, nonnegative A365314.
For nonnegative coefficients we have A365320, for subsets A365380.
For all subsets instead of just pairs we have A365322, complement A088314.
A004526 counts partitions of length 2, shift right for strict.
A007865 counts sum-free subsets, complement A093971.
A179822 and A326080 count sum-closed subsets.
A326083 and A124506 count combination-free subsets.
A364350 counts combination-free strict partitions.
A364914 and A365046 count combination-full 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[Subsets[Range[n],{2}], combp[n,#]=={}&]],{n,0,30}]
  • Python
    from itertools import count
    from sympy import divisors
    def A365321(n):
        a = set()
        for i in range(1,n+1):
            for j in count(i,i):
                if j >= n:
                    break
                for d in divisors(n-j):
                    if d>=i:
                        break
                    a.add((d,i))
        return (n*(n-1)>>1)-len(a) # Chai Wah Wu, Sep 12 2023

A365315 Number of unordered pairs of distinct positive integers <= n that can be linearly combined using positive coefficients to obtain n.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 5, 8, 10, 12, 15, 18, 20, 24, 28, 28, 35, 37, 42, 44, 49, 49, 60, 59, 66, 65, 79, 74, 85, 84, 93, 93, 107, 100, 120, 104, 126, 121, 142, 129, 145, 140, 160, 150, 173, 154, 189, 170, 196, 176, 208, 193, 223, 202, 238, 203, 241, 227, 267, 235
Offset: 0

Views

Author

Gus Wiseman, Sep 06 2023

Keywords

Comments

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

Examples

			We have 19 = 4*3 + 1*7, so the pair (3,7) is counted under a(19).
For the pair p = (2,3), we have 4 = 2*2 + 0*3, so p is counted under A365314(4), but it is not possible to write 4 as a positive linear combination of 2 and 3, so p is not counted under a(4).
The a(3) = 1 through a(10) = 15 pairs:
  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)
         (1,3)  (1,3)  (1,3)  (1,3)  (1,3)  (1,3)  (1,3)
                (1,4)  (1,4)  (1,4)  (1,4)  (1,4)  (1,4)
                (2,3)  (1,5)  (1,5)  (1,5)  (1,5)  (1,5)
                       (2,4)  (1,6)  (1,6)  (1,6)  (1,6)
                              (2,3)  (1,7)  (1,7)  (1,7)
                              (2,5)  (2,3)  (1,8)  (1,8)
                              (3,4)  (2,4)  (2,3)  (1,9)
                                     (2,6)  (2,5)  (2,3)
                                     (3,5)  (2,7)  (2,4)
                                            (3,6)  (2,6)
                                            (4,5)  (2,8)
                                                   (3,4)
                                                   (3,7)
                                                   (4,6)
		

Crossrefs

The unrestricted version is A000217, ranks A001358.
For all subsets instead of just pairs we have A088314, complement A365322.
For strict partitions we have A088571, complement A088528.
The case of nonnegative coefficients is A365314, for all subsets A365073.
The (binary) complement is A365321, nonnegative A365320.
A004526 counts partitions of length 2, shift right for strict.
A007865 counts sum-free subsets, complement A093971.
A179822 and A326080 count sum-closed subsets.
A326083 and A124506 appear to count combination-free subsets.
A364350 counts combination-free strict partitions.
A364914 and A365046 count combination-full 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[Subsets[Range[n],{2}],combp[n,#]!={}&]],{n,0,30}]
  • Python
    from itertools import count
    from sympy import divisors
    def A365315(n):
        a = set()
        for i in range(1,n+1):
            for j in count(i,i):
                if j >= n:
                    break
                for d in divisors(n-j):
                    if d>=i:
                        break
                    a.add((d,i))
        return len(a) # Chai Wah Wu, Sep 13 2023
Showing 1-3 of 3 results.