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 21-30 of 32 results. Next

A365544 Number of subsets of {1..n} containing two distinct elements summing to n.

Original entry on oeis.org

0, 0, 0, 2, 4, 14, 28, 74, 148, 350, 700, 1562, 3124, 6734, 13468, 28394, 56788, 117950, 235900, 484922, 969844, 1979054, 3958108, 8034314, 16068628, 32491550, 64983100, 131029082, 262058164, 527304974, 1054609948, 2118785834, 4237571668, 8503841150, 17007682300
Offset: 0

Views

Author

Gus Wiseman, Sep 20 2023

Keywords

Examples

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

Crossrefs

For strict partitions we have A140106 shifted left.
The version for partitions is A004526.
The complement is counted by A068911.
For all subsets of elements we have A365376.
Main diagonal k = n of A365541.
A000009 counts subsets summing to n.
A007865/A085489/A151897 count certain types of sum-free subsets.
A093971/A088809/A364534 count certain types of sum-full subsets.
A365381 counts subsets with a subset summing to k.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#,{2}],n]&]],{n,0,10}]
  • Python
    def A365544(n): return (1<>1)<<1 if n&1 else 3**(n-1>>1)<<2) if n else 0 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = 2^n - A068911(n).
From Alois P. Heinz, Aug 30 2024: (Start)
G.f.: 2*x^3/((2*x-1)*(3*x^2-1)).
a(n) = 2 * A167762(n-1) for n>=1. (End)

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

A367404 Triangle read by rows where T(n,k) is the number of integer partitions of n with a semi-sum k.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 5, 3, 4, 2, 3, 7, 5, 6, 4, 3, 3, 11, 7, 9, 6, 6, 3, 4, 15, 11, 13, 10, 9, 6, 4, 4, 22, 15, 20, 13, 15, 9, 8, 4, 5, 30, 22, 27, 21, 21, 15, 12, 8, 5, 5, 42, 30, 39, 28, 30, 21, 20, 12, 10, 5, 6, 56, 42, 53, 41, 42, 33, 28, 20, 15, 10, 6, 6
Offset: 2

Views

Author

Gus Wiseman, Nov 17 2023

Keywords

Comments

We define a semi-sum of a multiset to be any sum of a 2-element submultiset. This is different from sums of pairs of elements. For example, 2 is the sum of a pair of elements of {1}, but there are no semi-sums.

Examples

			The partition y = (3,2,1,1) has semi-sum 3 = 2+1, but no semi-sum 6, so y is counted under T(7,3) but not under T(7,6).
Triangle begins:
   1
   1   1
   2   1   2
   3   2   2   2
   5   3   4   2   3
   7   5   6   4   3   3
  11   7   9   6   6   3   4
  15  11  13  10   9   6   4   4
  22  15  20  13  15   9   8   4   5
  30  22  27  21  21  15  12   8   5   5
  42  30  39  28  30  21  20  12  10   5   6
  56  42  53  41  42  33  28  20  15  10   6   6
  77  56  73  55  60  42  44  28  25  15  12   6   7
Row n = 7 counts the following partitions:
  (511)      (421)     (331)    (421)   (511)  (61)
  (4111)     (3211)    (322)    (4111)  (421)  (52)
  (3211)     (2221)    (3211)   (322)   (331)  (43)
  (31111)    (22111)   (31111)  (3211)
  (22111)    (211111)  (2221)
  (211111)             (22111)
  (1111111)
		

Crossrefs

Column k = 0 is A000041.
Column n = k is A004526.
The complement for all submultisets is A046663, strict A365663.
For subsets instead of partitions we have A365541, non-binary A365381.
The non-binary version is A365543, strict A365661.
Row sums are A366738.
The strict case is A367405.

Programs

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

A367405 Triangle read by rows where T(n,k) is the number of strict integer partitions of n with two distinct parts summing to k.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 1, 1, 1, 2, 1, 0, 1, 1, 3, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 2, 4, 2, 2, 3, 2, 3, 2, 3, 4, 2, 2, 3, 2, 3, 3, 3, 3, 5, 3, 2, 4, 3, 4, 4, 5, 3, 4, 5, 3, 3, 5, 4, 4, 5, 5, 5, 4, 4, 6, 4, 3, 6, 5, 6, 5, 7, 5, 7, 4, 5, 6, 5, 5, 7, 7, 8, 7, 8, 8, 7, 7, 5, 5, 7
Offset: 3

Views

Author

Gus Wiseman, Nov 18 2023

Keywords

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  1  1  1  2
  1  0  1  1  3
  1  1  1  1  2  3
  1  1  1  2  2  2  4
  2  2  3  2  3  2  3  4
  2  2  3  2  3  3  3  3  5
  3  2  4  3  4  4  5  3  4  5
  3  3  5  4  4  5  5  5  4  4  6
  4  3  6  5  6  5  7  5  7  4  5  6
  5  5  7  7  8  7  8  8  7  7  5  5  7
  6  5  9  8 10  7 10  9 10  7  9  5  6  7
  7  7 10 10 12 11 11 11 12 10  9  9  6  6  8
  9  7 13 11 15 12 13 13 15 13 13  9 11  6  7  8
Row n = 9 counts the following strict partitions:
  (6,2,1)  (5,3,1)  (4,3,2)  (5,3,1)  (6,2,1)  (6,2,1)  (8,1)
                             (4,3,2)  (4,3,2)  (5,3,1)  (7,2)
                                                        (6,3)
                                                        (5,4)
Row n = 13 counts the following strict partitions (A=10, B=11, C=12):
  A21   931   841   751   652   751   841   931   A21  A21  C1
  7321  7321  832   742   643   7321  742   832   832  931  B2
  6421  5431  7321  6421  6421  652   7321  7321  742  841  A3
              6421  5431  5431  6421  643   643   652  751  94
              5431              5431  5431  6421            85
                                                            76
		

Crossrefs

Column n = k is A004526.
Column k = 3 is A025148.
For subsets instead of partitions we have A365541, non-binary A365381.
The non-binary version is A365661, non-strict A365543.
The non-binary complement is A365663, non-strict A046663.
Row sums are A366741, non-strict A366738.
The non-strict version is A367404.

Programs

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

A367396 Number of subsets of {1..n} whose cardinality is the sum of two distinct elements.

Original entry on oeis.org

0, 0, 0, 1, 3, 7, 17, 40, 90, 199, 435, 939, 2007, 4258, 8976, 18817, 39263, 81595, 168969, 348820, 718134, 1474863, 3022407, 6181687, 12621135, 25727686, 52369508, 106460521, 216162987, 438431215, 888359841, 1798371648, 3637518354, 7351824439, 14848255803
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2023

Keywords

Examples

			The set s = {1,2,3,6,7,8} has the following sums of pairs of distinct elements: {3,4,5,7,8,9,10,11,13,14,15}. This does not include 6, so s is not counted under a(8).
The a(0) = 0 through a(6) = 17 subsets:
  .  .  .  {1,2,3}  {1,2,3}    {1,2,3}      {1,2,3}
                    {1,2,4}    {1,2,4}      {1,2,4}
                    {1,2,3,4}  {1,2,5}      {1,2,5}
                               {1,2,3,4}    {1,2,6}
                               {1,2,3,5}    {1,2,3,4}
                               {1,3,4,5}    {1,2,3,5}
                               {1,2,3,4,5}  {1,2,3,6}
                                            {1,3,4,5}
                                            {1,3,4,6}
                                            {1,3,5,6}
                                            {1,2,3,4,5}
                                            {1,2,3,4,6}
                                            {1,2,3,5,6}
                                            {1,2,4,5,6}
                                            {1,3,4,5,6}
                                            {2,3,4,5,6}
                                            {1,2,3,4,5,6}
		

Crossrefs

The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum, linear combination, or semi-sum of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free semi-full semi-free
-----------------------------------------------------------
A002865 counts partitions whose length is a part, complement A229816.
A364534 counts sum-full subsets.
A088809 and A093971 count subsets containing semi-sums.
A366738 counts semi-sums of partitions, strict A366741.
Triangles:
A365381 counts subsets with a subset summing to k, complement A366320.
A365541 counts subsets with a semi-sum k.
A367404 counts partitions with a semi-sum k, strict A367405.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Subsets[#,{2}],Length[#]]&]],{n,0,10}]
  • Python
    from itertools import combinations
    def A367396(n): return sum(1 for k in range(3,n+1) for w in (set(d) for d in combinations(range(1,n+1),k)) if any({a,k-a}<=w for a in range(1,k+1>>1))) # Chai Wah Wu, Nov 21 2023

Formula

Conjectures from Chai Wah Wu, Nov 21 2023: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 4*a(n-3) - 5*a(n-4) + 2*a(n-5) for n > 4.
G.f.: x^3*(x - 1)/((2*x - 1)*(x^4 - 2*x^3 + x^2 - 2*x + 1)). (End)

Extensions

a(18)-a(33) from Chai Wah Wu, Nov 21 2023
a(34) from Paul Muljadi, Nov 24 2023

A367397 Numbers m such that bigomega(m) is the sum of prime indices of some semiprime divisor of m.

Original entry on oeis.org

4, 12, 18, 30, 36, 40, 42, 54, 60, 66, 78, 81, 90, 100, 102, 112, 114, 120, 126, 135, 138, 140, 150, 168, 174, 180, 186, 189, 198, 210, 220, 222, 225, 234, 246, 250, 252, 258, 260, 270, 280, 282, 297, 300, 306, 315, 318, 330, 336, 340, 342, 350, 351, 352, 354
Offset: 1

Views

Author

Gus Wiseman, Nov 21 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 A367394.

Crossrefs

The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum, linear combination, or semi-sum of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free semi-full semi-free
-----------------------------------------------------------
A325761 ranks partitions whose length is a part, counted by A002865.
A088809 and A093971 count subsets containing semi-sums.
A236912 counts partitions with no semi-sum of the parts, ranks A364461.
A237113 counts partitions with a semi-sum of the parts, ranks A364462.
A304792 counts subset-sums of partitions, strict A365925.
A366738 counts semi-sums of partitions, strict A366741.
Triangles:
A365381 counts subsets with a subset summing to k, complement A366320.
A365541 counts subsets with a semi-sum k.
A367404 counts partitions with a semi-sum k, strict A367405.

Programs

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

A367400 Number of subsets of {1..n} whose cardinality is not the sum of two distinct elements.

Original entry on oeis.org

1, 2, 4, 7, 13, 25, 47, 88, 166, 313, 589, 1109, 2089, 3934, 7408, 13951, 26273, 49477, 93175, 175468, 330442, 622289, 1171897, 2206921, 4156081, 7826746, 14739356, 27757207, 52272469, 98439697, 185381983, 349112000, 657448942, 1238110153
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2023

Keywords

Examples

			The set s = {1,2,3,6,7,8} has the following sums of pairs of distinct elements: {3,4,5,7,8,9,10,11,13,14,15}. This does not include 6, so s is counted under a(8).
The a(0) = 1 through a(4) = 13 subsets:
  {}  {}   {}     {}     {}
      {1}  {1}    {1}    {1}
           {2}    {2}    {2}
           {1,2}  {3}    {3}
                  {1,2}  {4}
                  {1,3}  {1,2}
                  {2,3}  {1,3}
                         {1,4}
                         {2,3}
                         {2,4}
                         {3,4}
                         {1,3,4}
                         {2,3,4}
		

Crossrefs

The version containing n appears to be A112575.
The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum, linear combination, or semi-sum of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free semi-full semi-free
-----------------------------------------------------------
A002865 counts partitions whose length is a part, complement A229816.
A364534 counts sum-full subsets.
A088809 and A093971 count subsets containing semi-sums.
A236912 counts partitions with no semi-sum of the parts, ranks A364461.
A366738 counts semi-sums of partitions, strict A366741.
Triangles:
A365381 counts subsets with a subset summing to k, complement A366320.
A365541 counts subsets with a semi-sum k.
A367404 counts partitions with a semi-sum k, strict A367405.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], FreeQ[Total/@Subsets[#, {2}], Length[#]]&]], {n,0,10}]
  • Python
    from itertools import combinations
    def A367400(n): return (n*(n+1)>>1)+1+sum(1 for k in range(3,n+1) for w in (set(d) for d in combinations(range(1,n+1),k)) if not any({a,k-a}<=w for a in range(1,k+1>>1))) # Chai Wah Wu, Nov 21 2023

Formula

Conjectures from Chai Wah Wu, Nov 21 2023: (Start)
a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - a(n-4) for n > 3.
G.f.: (-x^3 + x^2 + 1)/(x^4 - 2*x^3 + x^2 - 2*x + 1). (End)

Extensions

a(18)-a(33) from Chai Wah Wu, Nov 21 2023

A367401 Numbers m such that bigomega(m) is not the sum of prime indices of any semiprime divisor of m.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Gus Wiseman, Nov 21 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 A367398.

Examples

			60 has semiprime divisor 10 with prime indices {1,3} summing to 4 = bigomega(60), so 60 is not in the sequence.
The terms together with their prime indices begin:
   1: {}
   2: {1}
   3: {2}
   5: {3}
   6: {1,2}
   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

The following sequences count and rank integer partitions and finite sets according to whether their length is a subset-sum, linear combination, or semi-sum of the parts. The current sequence is starred.
sum-full sum-free comb-full comb-free semi-full semi-free
-----------------------------------------------------------
A002865 counts partitions w/ length, complement A229816, ranks A325761.
A088809 and A093971 count subsets containing semi-sums.
A236912 counts partitions with no semi-sum of the parts, ranks A364461.
A237113 counts partitions with a semi-sum of the parts, ranks A364462.
A366738 counts semi-sums of partitions, strict A366741.
Triangles:
A365381 counts subsets with a subset summing to k, complement A366320.
A365541 counts subsets with a semi-sum k.
A367404 counts partitions with a semi-sum k, strict A367405.

Programs

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

A237194 Triangular array: T(n,k) = number of strict partitions P of n into positive parts such that P includes a partition of k.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Feb 05 2014

Keywords

Examples

			First 13 rows:
1
0 1
1 1 2
1 0 1 2
1 1 1 1 3
2 2 1 2 2 4
2 2 2 2 2 2 5
3 2 3 1 3 2 3 6
3 3 4 3 3 4 3 3 8
5 4 5 4 3 4 5 4 5 10
5 5 5 5 5 5 5 5 5 5 12
7 6 7 7 7 4 7 7 7 6 7 15
8 7 8 8 8 8 8 8 8 8 7 8 18
T(12,4) = 7 counts these partitions:  [8,4], [8,3,1], [7,4,1], [6,4,2], [6,3,2,1], [5,4,3], [5,4,2,1].
		

Crossrefs

Column k = n is A000009.
Column k = 2 is A015744.
Column k = 1 is A025147.
The non-strict complement is obtained by adding zeros after A046663.
Diagonal n = 2k is A237258.
Row sums are A284640.
For subsets instead of partitions we have A365381.
The non-strict version is obtained by removing column k = 0 from A365543.
Including column k = 0 gives A365661.
The complement is obtained by adding zeros after A365663.

Programs

  • Mathematica
    Table[theTotals = Map[{#, Map[Total, Subsets[#]]} &, Select[IntegerPartitions[nn], # == DeleteDuplicates[#] &]]; Table[Length[Map[#[[1]] &, Select[theTotals, Length[Position[#[[2]], sumTo]] >= 1 &]]], {sumTo, nn}], {nn, 45}] // TableForm
    u = Flatten[%]  (* Peter J. C. Moses, Feb 04 2014 *)
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&MemberQ[Total/@Subsets[#], k]&]], {n,6}, {k,n}] (* Gus Wiseman, Nov 16 2023 *)

Formula

T(n,k) = T(n,n-k) for k=1..n-1, n >= 2.

A366131 Number of subsets of {1..n} with two elements (possibly the same) summing to n.

Original entry on oeis.org

0, 0, 2, 2, 10, 14, 46, 74, 202, 350, 862, 1562, 3610, 6734, 14926, 28394, 61162, 117950, 249022, 484922, 1009210, 1979054, 4076206, 8034314, 16422922, 32491550, 66045982, 131029082, 265246810, 527304974, 1064175886, 2118785834, 4266269482, 8503841150, 17093775742, 34101458042, 68461196410, 136664112494
Offset: 0

Views

Author

Gus Wiseman, Oct 07 2023

Keywords

Examples

			The a(0) = 0 through a(5) = 14 subsets:
  .  .  {1}    {1,2}    {2}        {1,4}
        {1,2}  {1,2,3}  {1,2}      {2,3}
                        {1,3}      {1,2,3}
                        {2,3}      {1,2,4}
                        {2,4}      {1,3,4}
                        {1,2,3}    {1,4,5}
                        {1,2,4}    {2,3,4}
                        {1,3,4}    {2,3,5}
                        {2,3,4}    {1,2,3,4}
                        {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 A117855.
For pairs summing to n + 1 we have A167936.
A068911 counts subsets of {1..n} w/o two distinct elements summing to n.
A093971/A088809/A364534 count certain types of sum-full subsets.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[Total/@Tuples[#,2],n]&]],{n,0,10}]
  • Python
    def A366131(n): return (1<>1)<<1) if n else 0 # Chai Wah Wu, Nov 14 2023

Formula

From Chai Wah Wu, Nov 14 2023: (Start)
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3) for n > 3.
G.f.: 2*x^2*(1 - x)/((2*x - 1)*(3*x^2 - 1)). (End)
Previous Showing 21-30 of 32 results. Next