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 14 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

A179009 Number of maximally refined partitions of n into distinct parts.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 2, 3, 5, 1, 3, 2, 3, 5, 7, 2, 5, 3, 4, 6, 7, 11, 3, 8, 5, 6, 6, 8, 11, 15, 7, 13, 9, 9, 9, 10, 12, 16, 22, 11, 20, 15, 17, 14, 15, 16, 18, 24, 30, 18, 30, 26, 28, 22, 27, 21, 25, 27, 33, 42, 36, 45, 43, 46, 38, 44, 33, 43, 36, 44, 47, 60, 46, 66, 64, 70, 63, 72, 61, 69, 60, 63, 58, 69, 80
Offset: 0

Views

Author

David S. Newman, Jan 03 2011

Keywords

Comments

Let a_1,a_2,...,a_k be a partition of n into distinct parts. We say that this partition can be refined if one of the summands, say a_i can be replaced with two numbers whose sum is a_i and the resulting partition is a partition into distinct parts. For example, the partition 5+2 can be refined because 5 can be replaced by 4+1 to give 4+2+1. If a partition into distinct parts cannot be refined we say that it is maximally refined.
The value of a(0) is taken to be 1 as is often done when considering partitions (also, the empty partition cannot be refined).
This sequence was suggested by Moshe Shmuel Newman.
From Gus Wiseman, Jun 07 2025: (Start)
Given any strict partition, the following are equivalent:
1) The parts are maximally refined.
2) Every strict partition of a part contains a part. In other words, if y is the set of parts and z is any strict partition of any element of y, then z must contain at least one element from y.
3) No part is a sum of distinct non-parts.
(End)

Examples

			a(11)=2 because there are two partitions of 11 which are maximally refined, namely 6+4+1 and 5+3+2+1.
From _Joerg Arndt_, Apr 23 2023: (Start)
The 15 maximally refined partitions of 35 are:
   1:    [ 1 2 3 4 5 6 14 ]
   2:    [ 1 2 3 4 5 7 13 ]
   3:    [ 1 2 3 4 5 8 12 ]
   4:    [ 1 2 3 4 5 9 11 ]
   5:    [ 1 2 3 4 6 7 12 ]
   6:    [ 1 2 3 4 6 8 11 ]
   7:    [ 1 2 3 4 6 9 10 ]
   8:    [ 1 2 3 4 7 8 10 ]
   9:    [ 1 2 3 5 6 7 11 ]
  10:    [ 1 2 3 5 6 8 10 ]
  11:    [ 1 2 3 5 7 8 9 ]
  12:    [ 1 2 4 5 6 7 10 ]
  13:    [ 1 2 4 5 6 8 9 ]
  14:    [ 1 3 4 5 6 7 9 ]
  15:    [ 2 3 4 5 6 7 8 ]
(End)
		

Crossrefs

For subsets instead of partitions we have A326080, complement A384350.
These partitions are ranked by A383707, apparently positions of 1 in A383706.
The strict complement is A384318 (strict partitions that can be refined).
This is the strict version of A384392, ranks A384320, complement apparently A384321.

Programs

  • Mathematica
    nonsets[y_]:=If[Length[y]==0,{},Rest[Subsets[Complement[Range[Max@@y],y]]]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Intersection[#,Total/@nonsets[#]]=={}&]],{n,0,15}] (* Gus Wiseman, Jun 09 2025 *)

Extensions

More terms from Joerg Arndt, Jan 04 2011

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

A384318 Number of strict integer partitions of n that are not maximally refined.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 3, 4, 4, 5, 9, 10, 13, 15, 17, 26, 29, 36, 43, 49, 57, 74, 84, 101, 118, 136, 158, 181, 219, 248, 291
Offset: 0

Views

Author

Gus Wiseman, May 28 2025

Keywords

Comments

This is the number of strict integer partitions of n containing at least one sum of distinct non-parts.
Conjecture: Also the number of strict integer partitions of n such that it is possible in more than one way to choose a disjoint family of strict integer partitions, one of each part.

Examples

			For y = (5,4,2) we have 4 = 3+1 so y is counted under a(11).
On the other hand, no part of z = (6,4,1) is a subset-sum of the non-parts {2,3,5}, so z is not counted under a(11).
The a(3) = 1 through a(11) = 10 strict partitions:
  (3)  (4)  (5)  (6)    (7)    (8)    (9)    (10)     (11)
                 (4,2)  (4,3)  (5,3)  (5,4)  (6,4)    (6,5)
                 (5,1)  (5,2)  (6,2)  (6,3)  (7,3)    (7,4)
                        (6,1)  (7,1)  (7,2)  (8,2)    (8,3)
                                      (8,1)  (9,1)    (9,2)
                                             (5,3,2)  (10,1)
                                             (5,4,1)  (5,4,2)
                                             (6,3,1)  (6,3,2)
                                             (7,2,1)  (7,3,1)
                                                      (8,2,1)
		

Crossrefs

The strict complement is A179009, ranks A383707.
The non-strict version for at least one choice is A383708, for none A383710.
The non-strict version is A384317, ranks A384321, complement A384392, ranks A384320.
These partitions are ranked by A384322.
For subsets instead of partitions we have A384350, complement A326080.
Cf. A357982, A383706 (disjoint), A384319, A384323 (non-strict).

Programs

  • Mathematica
    nonsets[y_]:=If[Length[y]==0,{},Rest[Subsets[Complement[Range[Max@@y],y]]]];
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Intersection[#,Total/@nonsets[#]]!={}&]],{n,0,30}]

Formula

a(n) = A000009(n) - A179009(n).

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

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 1, 7, 5, 12, 12, 27, 14, 42, 36, 47, 47, 83, 58, 109, 80, 116, 126, 172, 111, 195, 192, 219, 202, 294, 210, 342, 286, 354, 369, 409, 324, 509, 480, 523, 452, 640, 507, 711, 622, 675, 747, 865, 654, 916, 842, 964, 922, 1124, 940, 1147, 1029
Offset: 0

Views

Author

Gus Wiseman, Sep 06 2023

Keywords

Comments

Are there only two cases of nonzero adjacent equal parts, at positions n = 9, 15?

Examples

			The pair p = (3,6) cannot be linearly combined to obtain 8 or 10, so p is counted under a(8) and a(10), but we have 9 = 1*3 + 1*6 or 9 = 3*3 + 0*6, so p not counted under a(9).
The a(5) = 2 through a(10) = 12 pairs:
  (2,4)  (4,5)  (2,4)  (3,6)  (2,4)  (3,6)
  (3,4)         (2,6)  (3,7)  (2,6)  (3,8)
                (3,5)  (5,6)  (2,8)  (3,9)
                (3,6)  (5,7)  (4,6)  (4,7)
                (4,5)  (6,7)  (4,7)  (4,8)
                (4,6)         (4,8)  (4,9)
                (5,6)         (5,6)  (6,7)
                              (5,7)  (6,8)
                              (5,8)  (6,9)
                              (6,7)  (7,8)
                              (6,8)  (7,9)
                              (7,8)  (8,9)
		

Crossrefs

The unrestricted version is A000217, ranks A001358.
For strict partitions we have A365312, complement A365311.
The (binary) complement is A365314, positive A365315.
The case of positive coefficients is A365321, for all subsets A365322.
For partitions we have A365378, complement A365379.
For all subsets instead of just pairs we have A365380, complement A365073.
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
    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],{2}],combs[n,#]=={}&]],{n,0,30}]
  • Python
    from itertools import count
    from sympy import divisors
    def A365320(n):
        a = set()
        for i in range(1,n+1):
            if not n%i:
                a.update(tuple(sorted((i,j))) for j in range(1,n+1) if j!=i)
            else:
                for j in count(0,i):
                    if j > n:
                        break
                    k = n-j
                    for d in divisors(k):
                        if d>=i:
                            break
                        a.add((d,i))
        return (n*(n-1)>>1)-len(a) # Chai Wah Wu, Sep 13 2023

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

Original entry on oeis.org

0, 1, 2, 5, 11, 26, 54, 116, 238, 490, 994, 2011, 4045, 8131, 16305, 32672, 65412, 130924, 261958, 524066, 1048301, 2096826, 4193904, 8388135, 16776641, 33553759, 67108053, 134216782, 268434324, 536869595, 1073740266, 2147481835, 4294965158, 8589932129
Offset: 0

Views

Author

Gus Wiseman, Sep 04 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

			The set {1,3} has 4 = 1 + 3 so is not counted under a(4). However, 3 cannot be written as a linear combination of {1,3} using all positive coefficients, so it is counted under a(3).
The a(1) = 1 through a(4) = 11 subsets:
  {}  {}     {}       {}
      {1,2}  {2}      {3}
             {1,3}    {1,4}
             {2,3}    {2,3}
             {1,2,3}  {2,4}
                      {3,4}
                      {1,2,3}
                      {1,2,4}
                      {1,3,4}
                      {2,3,4}
                      {1,2,3,4}
		

Crossrefs

The complement is counted by A088314.
The version for strict partitions is A088528.
The nonnegative complement is counted by A365073, without n A365542.
The binary complement is A365315, nonnegative A365314.
The binary version is A365321, nonnegative A365320.
For nonnegative coefficients we have A365380.
A085489 and A364755 count subsets without the sum of two distinct elements.
A124506 appears to count combination-free subsets, differences of A326083.
A179822 counts sum-closed subsets, first differences of A326080.
A364350 counts combination-free strict partitions, non-strict A364915.
A365046 counts combination-full subsets, first differences of A364914.

Programs

  • Maple
    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-> 2^n-nops(b(n$2)):
    seq(a(n), n=0..33);  # Alois P. Heinz, Sep 04 2023
  • Mathematica
    cpu[n_,y_]:=With[{s=Table[{k,i},{k,Union[y]},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],cpu[n,#]=={}&]],{n,0,10}]
  • Python
    from sympy.utilities.iterables import partitions
    def A365322(n): return (1<Chai Wah Wu, Sep 14 2023

Formula

a(n) = 2^n - A088314(n).
a(n) = A070880(n) + 2^(n-1) for n>=1.

Extensions

More terms from Alois P. Heinz, Sep 04 2023

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

Original entry on oeis.org

0, 0, 1, 3, 6, 8, 14, 14, 23, 24, 33, 28, 52, 36, 55, 58, 73, 53, 95, 62, 110, 94, 105, 81, 165, 105, 133, 132, 176, 112, 225, 123, 210, 174, 192, 186, 306, 157, 223, 218, 328, 180, 354, 192, 324, 315, 288, 216, 474, 260, 383, 311, 404, 254, 491, 338, 511, 360
Offset: 0

Views

Author

Gus Wiseman, Sep 05 2023

Keywords

Comments

Is there only one case of nonzero adjacent equal parts, at position n = 6?

Examples

			We have 19 = 4*3 + 1*7, so the pair (3,7) is counted under a(19).
The a(2) = 1 through a(7) = 14 pairs:
  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)  (1,2)
         (1,3)  (1,3)  (1,3)  (1,3)  (1,3)
         (2,3)  (1,4)  (1,4)  (1,4)  (1,4)
                (2,3)  (1,5)  (1,5)  (1,5)
                (2,4)  (2,3)  (1,6)  (1,6)
                (3,4)  (2,5)  (2,3)  (1,7)
                       (3,5)  (2,4)  (2,3)
                       (4,5)  (2,5)  (2,5)
                              (2,6)  (2,7)
                              (3,4)  (3,4)
                              (3,5)  (3,7)
                              (3,6)  (4,7)
                              (4,6)  (5,7)
                              (5,6)  (6,7)
		

Crossrefs

The unrestricted version is A000217, ranks A001358.
For all subsets instead of just pairs we have A365073, complement A365380.
For strict partitions we have A365311, complement A365312.
The case of positive coefficients is A365315, for all subsets A088314.
The binary complement is A365320, positive A365321.
For partitions we have A365379, complement A365378.
A004526 counts partitions of length 2, shift right for strict.
A007865 counts sum-free subsets, complement A093971.
A179822 and A326080 count sum-closed subsets.
A364350 counts combination-free strict partitions.
A364914/A365046 count combination-full subsets, complement A326083/A124506.

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],{2}], combs[n,#]!={}&]],{n,0,30}]
  • Python
    from itertools import count
    from sympy import divisors
    def A365314(n):
        a = set()
        for i in range(1,n+1):
            if not n%i:
                a.update(tuple(sorted((i,j))) for j in range(1,n+1) if j!=i)
            else:
                for j in count(0,i):
                    if j > n:
                        break
                    k = n-j
                    for d in divisors(k):
                        if d>=i:
                            break
                        a.add((d,i))
        return len(a) # Chai Wah Wu, Sep 12 2023

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-10 of 14 results. Next