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

A116861 Triangle read by rows: T(n,k) is the number of partitions of n such that the sum of the parts, counted without multiplicities, is equal to k (n>=1, k>=1).

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 0, 2, 1, 3, 1, 1, 3, 1, 1, 4, 1, 0, 3, 2, 2, 2, 5, 1, 1, 3, 3, 2, 4, 2, 6, 1, 0, 5, 2, 3, 4, 4, 3, 8, 1, 1, 4, 3, 4, 7, 4, 5, 3, 10, 1, 0, 5, 3, 4, 7, 7, 6, 6, 5, 12, 1, 1, 6, 4, 3, 12, 6, 8, 7, 9, 5, 15, 1, 0, 6, 4, 5, 10, 10, 9, 10, 11, 10, 7, 18, 1, 1, 6, 4, 5, 15, 11, 13, 9, 16, 11, 13, 8, 22
Offset: 1

Views

Author

Emeric Deutsch, Feb 27 2006

Keywords

Comments

Conjecture: Reverse the rows of the table to get an infinite lower-triangular matrix b with 1's on the main diagonal. The third diagonal of the inverse of b is minus A137719. - George Beck, Oct 26 2019
Proof: The reversed rows yield the matrix I+N where N is strictly lower triangular, N[i,j] = 0 for j >= i, having its 2nd diagonal equal to the 2nd column (1, 0, 1, 0, 1, ...): N[i+1,i] = A000035(i), i >= 1, and 3rd diagonal equal to the 3rd column of this triangle, (2, 1, 2, 3, 3, 3, ...): N[i+2,i] = A137719(i), i >= 1. It is known that (I+N)^-1 = 1 - N + N^2 - N^3 +- .... Here N^2 has not only the second but also the 3rd diagonal zero, because N^2[i+2,i] = N[i+2,i+1]*N[i+1,i] = A000035(i+1)*A000035(i) = 0. Therefore the 3rd diagonal of (I+N)^-1 is equal to -A137719 without leading 0. - M. F. Hasler, Oct 27 2019
From Gus Wiseman, Aug 27 2023: (Start)
Also the number of ways to write n-k as a nonnegative linear combination of a strict integer partition of k. Also the number of ways to write n as a (strictly) positive linear combination of a strict integer partition of k. Row n=7 counts the following:
7*1 . 1*2+5*1 1*3+4*1 1*3+2*2 1*5+2*1 1*7
2*2+3*1 2*3+1*1 1*4+3*1 1*3+1*2+2*1 1*4+1*3
3*2+1*1 1*5+1*2
1*6+1*1
1*4+1*2+1*1
(End)

Examples

			T(10,7) = 4 because we have [6,1,1,1,1], [4,3,3], [4,2,2,1,1] and [4,2,1,1,1,1] (6+1=4+3=4+2+1=7).
Triangle starts:
  1;
  1, 1;
  1, 0, 2;
  1, 1, 1, 2;
  1, 0, 2, 1, 3;
  1, 1, 3, 1, 1,  4;
  1, 0, 3, 2, 2,  2, 5;
  1, 1, 3, 3, 2,  4, 2, 6;
  1, 0, 5, 2, 3,  4, 4, 3, 8;
  1, 1, 4, 3, 4,  7, 4, 5, 3, 10;
  1, 0, 5, 3, 4,  7, 7, 6, 6,  5, 12;
  1, 1, 6, 4, 3, 12, 6, 8, 7,  9,  5, 15;
  ...
		

Crossrefs

Cf. A000041 (row sums), A000009 (diagonal), A014153.
Cf. A114638 (count partitions with #parts = sum(distinct parts)).
Column 1: A000012, column 2: A000035(1..), column 3: A137719(1..).
For subsets instead of partitions we have A026820.
This statistic is ranked by A066328.
The central diagonal is T(2n,n) = A364910(n), non-strict A364907.
Partial sums of columns are columns of A364911.
Same as A364916 (offset 0) with rows reversed.
A008284 counts partitions by length, strict A008289.
A364912 counts linear combinations of partitions.
A364913 counts combination-full partitions, strict A364839.

Programs

  • Maple
    g:= -1+product(1+t^j*x^j/(1-x^j), j=1..40): gser:= simplify(series(g,x=0,18)): for n from 1 to 14 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 14 do seq(coeff(P[n],t^j),j=1..n) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; local f, g, j;
          if n=0 then [1] elif i<1 then [ ] else f:= b(n, i-1);
             for j to n/i do
               f:= zip((x, y)->x+y, f, [0$i, b(n-i*j, i-1)[]], 0)
             od; f
          fi
        end:
    T:= n-> subsop(1=NULL, b(n, n))[]:
    seq(T(n), n=1..20);  # Alois P. Heinz, Feb 27 2013
  • Mathematica
    max = 14; s = Series[-1+Product[1+t^j*x^j/(1-x^j), {j, 1, max}], {x, 0, max}, {t, 0, max}] // Normal; t[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}]; Table[t[n, k], {n, 1, max}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 17 2014 *)
    Table[Length[Select[IntegerPartitions[n],Total[Union[#]]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Aug 29 2023 *)
  • PARI
    A116861(n,k,s=0)={forpart(X=n,vecsum(Set(X))==k&&s++,k);s} \\ M. F. Hasler, Oct 27 2019

Formula

G.f.: -1 + Product_{j>=1} (1 + t^j*x^j/(1-x^j)).
Sum_{k=1..n} T(n,k) = A000041(n).
T(n,n) = A000009(n).
Sum_{k=1..n} k*T(n,k) = A014153(n-1).
T(n,1) = 1. T(n,2) = A000035(n+1). T(n,3) = A137719(n-2). - R. J. Mathar, Oct 27 2019
T(n,4) = A002264(n-1) + A121262(n). - R. J. Mathar, Oct 28 2019

A364350 Number of strict integer partitions of n such that no part can be written as a nonnegative linear combination of the others.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 3, 5, 3, 6, 5, 7, 6, 9, 7, 11, 10, 14, 12, 16, 15, 20, 17, 24, 22, 27, 29, 32, 30, 41, 36, 49, 45, 50, 52, 65, 63, 70, 77, 80, 83, 104, 98, 107, 116, 126, 134, 152, 148, 162, 180, 196, 195, 227, 227, 238, 272, 271, 293, 333, 325
Offset: 0

Views

Author

Gus Wiseman, Aug 15 2023

Keywords

Comments

A way of writing n as a (presumed nonnegative) linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i >= 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(1,1),(0,2)) are a way of writing 5 as a linear combination of (1,1,1,2), namely 5 = 3*1 + 1*1 + 1*1 + 0*2. Of course, there are A000041(n) ways to write n as a linear combination of (1..n).

Examples

			The a(16) = 6 through a(22) = 12 strict partitions:
  (16)     (17)     (18)     (19)     (20)      (21)      (22)
  (9,7)    (9,8)    (10,8)   (10,9)   (11,9)    (12,9)    (13,9)
  (10,6)   (10,7)   (11,7)   (11,8)   (12,8)    (13,8)    (14,8)
  (11,5)   (11,6)   (13,5)   (12,7)   (13,7)    (15,6)    (15,7)
  (13,3)   (12,5)   (14,4)   (13,6)   (14,6)    (16,5)    (16,6)
  (7,5,4)  (13,4)   (7,6,5)  (14,5)   (17,3)    (17,4)    (17,5)
           (14,3)   (8,7,3)  (15,4)   (8,7,5)   (19,2)    (18,4)
           (15,2)            (16,3)   (9,6,5)   (11,10)   (19,3)
           (7,6,4)           (17,2)   (9,7,4)   (8,7,6)   (12,10)
                             (8,6,5)  (11,5,4)  (9,7,5)   (9,7,6)
                             (9,6,4)            (10,7,4)  (9,8,5)
                                                (10,8,3)  (7,6,5,4)
                                                (11,6,4)
                                                (11,7,3)
		

Crossrefs

For sums of subsets instead of combinations of partitions we have A151897.
For sums instead of combinations we have A237667, binary A236912.
For subsets instead of partitions we have A326083, complement A364914.
The complement in strict partitions is A364839, non-strict A364913.
A more strict variation is A364915.
The case of all positive coefficients is A365006.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A108917 counts knapsack partitions, ranks A299702.
A116861 and A364916 count linear combinations of strict partitions.
A323092 (ranks A320340) and A120641 count double-free partitions.
A364912 counts linear combinations of partitions of 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[IntegerPartitions[n],UnsameQ@@#&&And@@Table[combs[#[[k]],Delete[#,k]]=={},{k,Length[#]}]&]],{n,0,15}]
  • Python
    from sympy.utilities.iterables import partitions
    def A364350(n):
        if n <= 1: return 1
        alist, c = [set(tuple(sorted(set(p))) for p in partitions(i)) for i in range(n)], 1
        for p in partitions(n,k=n-1):
            if max(p.values(),default=0)==1:
                s = set(p)
                if not any(set(t).issubset(s-{q}) for q in s for t in alist[q]):
                    c += 1
        return c # Chai Wah Wu, Sep 23 2023

Extensions

More terms and offset corrected by Martin Fuller, Sep 11 2023

A093971 Number of sum-full subsets of {1,...,n}; subsets A such that there is a solution to x+y=z for x,y,z in A.

Original entry on oeis.org

0, 1, 2, 7, 16, 40, 86, 195, 404, 873, 1795, 3727, 7585, 15537, 31368, 63582, 127933, 257746, 517312, 1038993, 2081696, 4173322, 8355792, 16731799, 33484323, 67014365, 134069494, 268234688, 536562699, 1073326281, 2146849378, 4294117419, 8588623348, 17178130162
Offset: 1

Views

Author

T. D. Noe, Apr 20 2004

Keywords

Comments

In sumset notation, number of subsets A of {1,...,n} such that the intersection of A and 2A is nonempty.
A variation of binary sum-full sets where parts can be re-used, this sequence counts subsets of {1..n} containing a part equal to the sum of two other (possibly equal) parts. The complement is counted by A007865. The non-binary version is A364914. For non-re-usable parts we have A088809. - Gus Wiseman, Aug 14 2023

Examples

			The a(1) = 0 through a(5) = 16 subsets:
  .  {1,2}  {1,2}    {1,2}      {1,2}
            {1,2,3}  {2,4}      {2,4}
                     {1,2,3}    {1,2,3}
                     {1,2,4}    {1,2,4}
                     {1,3,4}    {1,2,5}
                     {2,3,4}    {1,3,4}
                     {1,2,3,4}  {1,4,5}
                                {2,3,4}
                                {2,3,5}
                                {2,4,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}
		

Crossrefs

The complement is counted by A007865.
The version without re-usable parts is A088809 (differences A364756), complement A085489 (differences A364755).
The non-binary version is A364914, complement A326083.
The non-binary version w/o re-usable parts is A364534, complement A151897.
The version for partitions is A363225:
- ranks A364348,
- strict A363226,
- non-binary A364839,
- without re-usable parts A237113,
- non-binary without re-usable parts A237668.
The complement for partitions is A364345:
- ranks A364347,
- strict A364346,
- non-binary A364350,
- without re-usable parts A236912,
- non-binary without re-usable parts A237667.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Total/@Tuples[#,2]]!={}&]],{n,0,10}] (* Gus Wiseman, Aug 14 2023 *)

Formula

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

Extensions

Terms a(31) and beyond from Fausto A. C. Cariboni, Oct 01 2020

A364914 Number of subsets of {1..n} such that some element can be written as a nonnegative linear combination of the others.

Original entry on oeis.org

0, 0, 1, 3, 9, 20, 48, 101, 219, 454, 944, 1917, 3925, 7915, 16004, 32188, 64751, 129822, 260489, 521672, 1045060, 2091808, 4187047, 8377255, 16762285, 33531228, 67077485, 134170217, 268371678, 536772231, 1073611321, 2147282291, 4294697258, 8589527163, 17179321094
Offset: 0

Views

Author

Gus Wiseman, Aug 17 2023

Keywords

Comments

A variation of non-binary combination-full sets where parts can be re-used. The complement is counted by A326083. The binary version is A093971. For non-re-usable parts we have A364534. First differences are A365046.

Examples

			The set {3,4,5,17} has 17 = 1*3 + 1*4 + 2*5, so is counted under a(17).
The a(0) = 0 through a(5) = 20 subsets:
  .  .  {1,2}  {1,2}    {1,2}      {1,2}
               {1,3}    {1,3}      {1,3}
               {1,2,3}  {1,4}      {1,4}
                        {2,4}      {1,5}
                        {1,2,3}    {2,4}
                        {1,2,4}    {1,2,3}
                        {1,3,4}    {1,2,4}
                        {2,3,4}    {1,2,5}
                        {1,2,3,4}  {1,3,4}
                                   {1,3,5}
                                   {1,4,5}
                                   {2,3,4}
                                   {2,3,5}
                                   {2,4,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}
		

Crossrefs

The binary complement is A007865.
The binary version without re-usable parts is A088809.
The binary version is A093971.
The complement without re-usable parts is A151897.
The complement is counted by A326083.
The version without re-usable parts is A364534.
The version for strict partitions is A364839, complement A364350.
The version for partitions is A364913.
The version for positive combinations is A365043, complement A365044.
First differences are A365046.

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

Extensions

a(12)-a(34) from Chai Wah Wu, Nov 17 2023

A365663 Triangle read by rows where T(n,k) is the number of strict integer partitions of n without a subset summing to k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 5, 3, 4, 3, 5, 5, 4, 5, 5, 4, 5, 5, 5, 6, 5, 6, 7, 6, 5, 6, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 8, 8, 8, 11, 8, 8, 8, 9, 8, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 12, 13, 11, 13, 11, 12, 15, 12, 11, 13, 11, 13, 12
Offset: 2

Views

Author

Gus Wiseman, Sep 17 2023

Keywords

Comments

Warning: Do not confuse with the non-strict version A046663.
Rows are palindromes.

Examples

			Triangle begins:
  1
  1  1
  1  2  1
  2  2  2  2
  2  2  3  2  2
  3  3  3  3  3  3
  3  4  3  5  3  4  3
  5  5  4  5  5  4  5  5
  5  6  5  6  7  6  5  6  5
  7  7  7  7  7  7  7  7  7  7
  8  9  8  8  8 11  8  8  8  9  8
Row n = 8 counts the following strict partitions:
  (8)    (8)      (8)    (8)      (8)    (8)      (8)
  (6,2)  (7,1)    (7,1)  (7,1)    (7,1)  (7,1)    (6,2)
  (5,3)  (5,3)    (6,2)  (6,2)    (6,2)  (5,3)    (5,3)
         (4,3,1)         (5,3)           (4,3,1)
                         (5,2,1)
		

Crossrefs

Columns k = 0 and k = n are A025147.
The non-strict version is A046663, central column A006827.
Central column n = 2k is A321142.
The complement for subsets instead of strict partitions is A365381.
The complement is A365661, non-strict A365543, central column A237258.
Row sums are A365922.
A000009 counts subsets summing to n.
A000124 counts distinct possible sums of subsets of {1..n}.
A124506 appears to count combination-free subsets, differences of A326083.
A364272 counts sum-full strict partitions, sum-free A364349.
A364350 counts combination-free strict partitions, complement A364839.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&FreeQ[Total/@Subsets[#],k]&]], {n,2,15},{k,1,n-1}]

A364916 Array read by antidiagonals downwards where A(n,k) is the number of ways to write n as a nonnegative linear combination of the parts of a strict integer partition of k.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 0, 1, 0, 2, 1, 1, 1, 0, 3, 1, 2, 0, 1, 0, 4, 1, 1, 3, 1, 1, 0, 5, 2, 2, 2, 3, 0, 1, 0, 6, 2, 4, 2, 3, 3, 1, 1, 0, 8, 3, 4, 4, 3, 2, 5, 0, 1, 0, 10, 3, 5, 4, 7, 4, 3, 4, 1, 1, 0, 12, 5, 6, 6, 7, 7, 4, 3, 5, 0, 1, 0, 15, 5, 9, 7, 8, 6, 12, 3, 4, 6, 1, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Aug 17 2023

Keywords

Comments

A way of writing n as a (nonnegative) linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i >= 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(1,1),(0,2)) are a way of writing 5 as a linear combination of (1,1,1,2), namely 5 = 3*1 + 1*1 + 1*1 + 0*2. Of course, there are A000041(n) ways to write n as a linear combination of (1..n).
As a triangle, also the number of ways to write n as a *positive* linear combination of the parts of a strict integer partition of k.

Examples

			Array begins:
  1  1  1  2  2  3  4   5   6   8   10   12  15   18   22   27
  0  1  0  1  1  1  2   2   3   3   5    5   7    8    10   12
  0  1  1  2  1  2  4   4   5   6   9    10  13   15   19   23
  0  1  0  3  2  2  4   4   6   7   11   11  15   17   22   27
  0  1  1  3  3  3  7   7   8   10  16   17  23   27   33   42
  0  1  0  3  2  4  7   6   9   9   17   17  23   26   33   43
  0  1  1  5  3  4  12  10  13  16  26   27  36   42   52   68
  0  1  0  4  3  3  10  11  13  13  27   25  35   40   51   67
  0  1  1  5  4  5  15  13  19  20  36   37  51   58   72   97
  0  1  0  6  4  5  14  13  18  23  42   39  54   61   78   105
  0  1  1  6  4  6  20  17  23  25  54   50  69   80   98   138
  0  1  0  6  4  5  19  16  23  24  54   55  71   80   103  144
  0  1  1  8  6  7  27  23  30  35  72   70  103  113  139  199
  0  1  0  7  5  6  24  21  29  31  75   68  95   115  139  201
  0  1  1  8  5  7  31  27  36  39  90   86  122  137  178  255
  0  1  0  9  6  8  31  27  38  42  100  93  129  148  187  289
Triangle begins:
   1
   1  0
   1  1  0
   2  0  1  0
   2  1  1  1  0
   3  1  2  0  1  0
   4  1  1  3  1  1  0
   5  2  2  2  3  0  1  0
   6  2  4  2  3  3  1  1  0
   8  3  4  4  3  2  5  0  1  0
  10  3  5  4  7  4  3  4  1  1  0
  12  5  6  6  7  7  4  3  5  0  1  0
  15  5  9  7  8  6 12  3  4  6  1  1  0
  18  7 10 11 10  9 10 10  5  4  6  0  1  0
  22  8 13 11 16  9 13 11 15  5  4  6  1  1  0
  27 10 15 15 17 17 16 13 13 14  6  4  8  0  1  0
		

Crossrefs

Same as A116861 with offset 0 and rows reversed, non-strict version A364912.
Row n = 0 is A000009.
Row n = 1 is A096765.
Row n = 2 is A365005.
Column k = 0 is A000007.
Column k = 1 is A000012.
Column k = 2 is A000035.
Column k = 3 is A137719.
The main diagonal is A364910.
Left half has row sums A365002.
For not just strict partitions we have A365004, diagonal A364907.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A066328 adds up distinct prime indices.
A364350 counts combination-free strict partitions, complement A364839.

Programs

  • Mathematica
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    t[n_,k_]:=Length[Join@@Table[combs[n,ptn],{ptn,Select[IntegerPartitions[k],UnsameQ@@#&]}]];
    Table[t[k,n-k],{n,0,15},{k,0,n}]

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.

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

A364913 Number of integer partitions of n having a part that can be written as a nonnegative linear combination of the other (possibly equal) parts.

Original entry on oeis.org

0, 0, 1, 2, 4, 5, 10, 12, 20, 27, 39, 51, 74, 95, 130, 169, 225, 288, 378, 479, 617, 778, 990, 1239, 1560, 1938, 2419, 2986, 3696, 4538, 5575, 6810, 8319, 10102, 12274, 14834, 17932, 21587, 25963, 31120, 37275, 44513, 53097, 63181, 75092, 89030, 105460, 124647
Offset: 0

Views

Author

Gus Wiseman, Aug 20 2023

Keywords

Comments

Includes all non-strict partitions (A047967).

Examples

			The a(0) = 0 through a(7) = 12 partitions:
  .  .  (11)  (21)   (22)    (41)     (33)      (61)
              (111)  (31)    (221)    (42)      (322)
                     (211)   (311)    (51)      (331)
                     (1111)  (2111)   (222)     (421)
                             (11111)  (321)     (511)
                                      (411)     (2221)
                                      (2211)    (3211)
                                      (3111)    (4111)
                                      (21111)   (22111)
                                      (111111)  (31111)
                                                (211111)
                                                (1111111)
The partition (5,4,3) has no part that can be written as a nonnegative linear combination of the others, so is not counted under a(12).
The partition (6,4,3,2) has 6 = 4+2, or 6 = 3+3, or 6 = 2+2+2, or 4 = 2+2, so is counted under a(15).
		

Crossrefs

The strict case is A364839.
For sums instead of combinations we have A364272, binary A364670.
The complement in strict partitions is A364350.
For subsets instead of partitions we have A364914, complement A326083.
Allowing equal parts gives A365068, complement A364915.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A116861 and A364916 count linear combinations of strict partitions.
A365006 = no strict partitions w/ pos linear combination.

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@@#||Or@@Table[combs[#[[k]],Delete[#,k]]!={},{k,Length[#]}]&]],{n,0,15}]

Formula

a(n) + A364915(n) = A000041(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
Showing 1-10 of 49 results. Next