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

A237113 Number of partitions of n such that some part is a sum of two other parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 3, 3, 8, 10, 17, 22, 37, 47, 71, 91, 133, 170, 236, 301, 408, 515, 686, 860, 1119, 1401, 1798, 2232, 2829, 3495, 4378, 5381, 6682, 8165, 10060, 12238, 14958, 18116, 22018, 26533, 32071, 38490, 46265, 55318, 66193, 78843, 93949, 111503, 132326
Offset: 0

Views

Author

Clark Kimberling, Feb 04 2014

Keywords

Comments

These are partitions containing the sum of some 2-element submultiset of the parts, a variation of binary sum-full partitions where parts cannot be re-used, ranked by A364462. The complement is counted by A236912. The non-binary version is A237668. For re-usable parts we have A363225. - Gus Wiseman, Aug 10 2023

Examples

			Of the 11 partitions of 6, only these 3 include a part that is a sum of two other parts: [3,2,1], [2,2,1,1], [2,1,1,1,1].  Thus, a(6) = 3.
From _Gus Wiseman_, Aug 09 2023: (Start)
The a(0) = 0 through a(9) = 10 partitions:
  .  .  .  .  (211)  (2111)  (321)    (3211)    (422)      (3321)
                             (2211)   (22111)   (431)      (4221)
                             (21111)  (211111)  (3221)     (4311)
                                                (4211)     (5211)
                                                (22211)    (32211)
                                                (32111)    (42111)
                                                (221111)   (222111)
                                                (2111111)  (321111)
                                                           (2211111)
                                                           (21111111)
(End)
		

Crossrefs

The complement for subsets is A085489, with re-usable parts A007865.
For subsets of {1..n} we have A088809, with re-usable parts A093971.
The complement is counted by A236912, ranks A364461.
The non-binary complement is A237667, ranks A364531.
The non-binary version is A237668, ranks A364532.
With re-usable parts we have A363225, ranks A364348.
The complement with re-usable parts is A364345, ranks A364347.
These partitions have ranks A364462.
The strict case is A364670, with re-usable parts A363226.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A108917 counts knapsack partitions, ranks A299702.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    z = 20; t = Map[Count[Map[Length[Cases[Map[Total[#] &, Subsets[#, {2}]],  Apply[Alternatives, #]]] &, IntegerPartitions[#]], 0] &, Range[z]] (* A236912 *)
    u = PartitionsP[Range[z]] - t  (* A237113, Peter J. C. Moses, Feb 03 2014 *)
    Table[Length[Select[IntegerPartitions[n],Intersection[#,Total/@Subsets[#,{2}]]!={}&]],{n,0,30}] (* Gus Wiseman, Aug 09 2023 *)

Formula

a(n) = A000041(n) - A236912(n).

Extensions

a(0)=0 prepended by Alois P. Heinz, Sep 17 2023

A236912 Number of partitions of n such that no part is a sum of two other parts.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 12, 14, 20, 25, 34, 40, 54, 64, 85, 98, 127, 149, 189, 219, 277, 316, 395, 456, 557, 638, 778, 889, 1070, 1226, 1461, 1667, 1978, 2250, 2645, 3019, 3521, 3997, 4652, 5267, 6093, 6909, 7943, 8982, 10291, 11609, 13251, 14947, 16984, 19104
Offset: 0

Views

Author

Clark Kimberling, Feb 01 2014

Keywords

Comments

These are partitions containing the sum of no 2-element submultiset of the parts, a variation of binary sum-free partitions where parts cannot be re-used, ranked by A364461. The complement is counted by A237113. The non-binary version is A237667. For re-usable parts we have A364345. - Gus Wiseman, Aug 09 2023

Examples

			Of the 11 partitions of 6, only these 3 include a part that is a sum of two other parts: [3,2,1], [2,2,1,1], [2,1,1,1,1].  Thus, a(6) = 11 - 3 = 8.
From _Gus Wiseman_, Aug 09 2023: (Start)
The a(1) = 1 through a(8) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (1111)  (221)    (51)      (61)       (62)
                            (311)    (222)     (322)      (71)
                            (11111)  (411)     (331)      (332)
                                     (3111)    (421)      (521)
                                     (111111)  (511)      (611)
                                               (2221)     (2222)
                                               (4111)     (3311)
                                               (31111)    (5111)
                                               (1111111)  (41111)
                                                          (311111)
                                                          (11111111)
(End)
		

Crossrefs

For subsets of {1..n} we have A085489, complement A088809.
The complement is counted by A237113, ranks A364462.
The non-binary version is A237667, ranks A364531.
The non-binary complement is A237668, ranks A364532.
The version with re-usable parts is A364345, ranks A364347.
The (strict) version for linear combinations of parts is A364350.
These partitions have ranks A364461.
The strict case is A364533, non-binary A364349.
The strict complement is A364670, with re-usable parts A363226.
A000041 counts partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A108917 counts knapsack partitions, ranks A299702.
A323092 counts double-free partitions, ranks A320340.

Programs

  • Mathematica
    z = 20; t = Map[Count[Map[Length[Cases[Map[Total[#] &, Subsets[#, {2}]],  Apply[Alternatives, #]]] &, IntegerPartitions[#]], 0] &, Range[z]] (* A236912 *)
    u = PartitionsP[Range[z]] - t  (* A237113, Peter J. C. Moses, Feb 03 2014 *)
    Table[Length[Select[IntegerPartitions[n],Intersection[#,Total/@Subsets[#,{2}]]=={}&]],{n,0,15}] (* Gus Wiseman, Aug 09 2023 *)

Formula

a(n) = A000041(n) - A237113(n).

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 17 2023

A363225 Number of integer partitions of n containing three parts (a,b,c) (repeats allowed) such that a + b = c. A variation of sum-full partitions.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 9, 14, 21, 29, 43, 58, 81, 109, 148, 195, 263, 339, 445, 574, 744, 942, 1209, 1515, 1923, 2399, 3005, 3721, 4629, 5693, 7024, 8589, 10530, 12804, 15596, 18876, 22870, 27538, 33204, 39816, 47766, 57061, 68161, 81099, 96510, 114434, 135634
Offset: 0

Views

Author

Gus Wiseman, Jul 19 2023

Keywords

Comments

Note that, by this definition, the partition (2,1) is sum-full, because (1,1,2) is a triple satisfying a + b = c.

Examples

			The a(3) = 1 through a(9) = 14 partitions:
  (21)  (211)  (221)   (42)     (421)     (422)      (63)
               (2111)  (321)    (2221)    (431)      (432)
                       (2211)   (3211)    (521)      (621)
                       (21111)  (22111)   (3221)     (3321)
                                (211111)  (4211)     (4221)
                                          (22211)    (4311)
                                          (32111)    (5211)
                                          (221111)   (22221)
                                          (2111111)  (32211)
                                                     (42111)
                                                     (222111)
                                                     (321111)
                                                     (2211111)
                                                     (21111111)
		

Crossrefs

For subsets of {1..n} we have A093971, A088809 without re-using parts.
The complement for subsets is A007865, A085489 without re-using parts.
Without re-using parts we have A237113, complement A236912.
For sums of any length > 1 (without re-usable parts) we have A237668, complement A237667.
The strict case is A363226.
The complement is counted by A364345, strict A364346.
These partitions have ranks A364348, complement A364347.
The strict linear combination-free version is A364350.
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[#,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 A363225(n): return sum(1 for p in partitions(n) if any(q[0]+q[1]==q[2] for q in combinations_with_replacement(sorted(Counter(p).elements()),3))) # Chai Wah Wu, Sep 21 2023

Extensions

a(31)-a(48) from Chai Wah Wu, Sep 21 2023

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}]

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

A364531 Positive integers with no prime index equal to the sum of prime indices of any nonprime divisor.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Aug 01 2023

Keywords

Comments

First differs from A299702 (knapsack) in having 525: {2,3,3,4}.
First differs from A325778 in lacking 462: {1,2,4,5}.
These are the Heinz numbers of partitions whose parts are disjoint from their own non-singleton subset-sums.

Crossrefs

Partitions of this type are counted by A237667, strict A364349.
The binary version is A364462, complement A364461.
The complement is A364532, counted by A237668.
A000005 counts divisors, nonprime A033273, composite A055212.
A299701 counts distinct subset-sums of prime indices.
A299702 ranks knapsack partitions, counted by A108917, complement A299729.
A363260 counts partitions disjoint from differences, complement A364467.

Programs

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

A364463 Number of subsets of {1..n} with elements disjoint from first differences of elements.

Original entry on oeis.org

1, 2, 3, 6, 10, 18, 30, 54, 92, 167, 290, 525, 935, 1704, 3082, 5664, 10386, 19249, 35701, 66702, 124855, 234969, 443174, 839254, 1592925, 3032757, 5786153, 11066413, 21204855, 40712426, 78294085, 150815154, 290922900, 561968268, 1086879052, 2104570243
Offset: 0

Views

Author

Gus Wiseman, Jul 27 2023

Keywords

Comments

In other words, no element is the difference of two consecutive elements.
From David A. Corneth, Aug 02 2023: (Start)
As subsets counted in a(n) are also counted in a(n+1) and {n+1} is a subset counted in a(n+1) but not a(n), a(n + 1) > a(n) for n >= 1.
As every subset counted in a(n + 1) that contains n+1 can be found from some subset counted in a(n) by appending n+1 and every subset counted in a(n) not containing n + 1 is counted in a(n + 1), a(n+1) <= 2*a(n). (End)

Examples

			The a(0) = 1 through a(5) = 18 subsets:
  {}  {}   {}   {}     {}       {}
      {1}  {1}  {1}    {1}      {1}
           {2}  {2}    {2}      {2}
                {3}    {3}      {3}
                {1,3}  {4}      {4}
                {2,3}  {1,3}    {5}
                       {1,4}    {1,3}
                       {2,3}    {1,4}
                       {3,4}    {1,5}
                       {2,3,4}  {2,3}
                                {2,5}
                                {3,4}
                                {3,5}
                                {4,5}
                                {1,3,5}
                                {2,3,4}
                                {3,4,5}
                                {2,3,4,5}
		

Crossrefs

For all differences of pairs of elements we have A007865.
For partitions instead of subsets we have A363260, strict A364464.
The complement is counted by A364466.
A000041 counts integer partitions, strict A000009.
A364465 counts subsets with distinct first differences, partitions A325325.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Differences[#]]=={}&]],{n,0,10}]
  • Python
    from itertools import combinations
    def A364463(n): return sum(1 for l in range(n+1) for c in combinations(range(1,n+1),l) if set(c).isdisjoint({c[i+1]-c[i] for i in range(l-1)})) # Chai Wah Wu, Sep 26 2023

Formula

a(n) < a(n + 1) <= 2 * a(n). - David A. Corneth, Aug 02 2023

Extensions

a(21)-a(29) from David A. Corneth, Aug 02 2023
a(30)-a(32) from Chai Wah Wu, Sep 26 2023
a(33)-a(35) from Chai Wah Wu, Sep 27 2023

A364464 Number of strict integer partitions of n where no part is the difference of two consecutive parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 4, 6, 5, 8, 9, 12, 13, 16, 16, 21, 23, 29, 34, 38, 41, 49, 57, 64, 73, 86, 95, 110, 120, 135, 160, 171, 197, 219, 247, 277, 312, 342, 386, 431, 476, 527, 598, 640, 727, 796, 893, 966, 1097, 1178, 1327, 1435, 1602, 1740, 1945, 2084, 2337
Offset: 0

Views

Author

Gus Wiseman, Jul 30 2023

Keywords

Comments

In other words, the parts are disjoint from the first differences.

Examples

			The strict partition y = (9,5,3,1) has differences (4,2,2), and these are disjoint from the parts, so y is counted under a(18).
The a(1) = 1 through a(9) = 6 strict partitions:
  (1)  (2)  (3)  (4)    (5)    (6)    (7)    (8)    (9)
                 (3,1)  (3,2)  (5,1)  (4,3)  (5,3)  (5,4)
                        (4,1)         (5,2)  (6,2)  (7,2)
                                      (6,1)  (7,1)  (8,1)
                                                    (4,3,2)
                                                    (5,3,1)
		

Crossrefs

For length instead of differences we have A240861, non-strict A229816.
For all differences of pairs of elements we have A364346, for subsets A007865.
For subsets instead of strict partitions we have A364463, complement A364466.
The non-strict version is A363260.
The complement is counted by A364536, non-strict A364467.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A120641 counts strict double-free partitions, non-strict A323092.
A320347 counts strict partitions w/ distinct differences, non-strict A325325.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Intersection[#,-Differences[#]]=={}&]],{n,0,15}]
  • Python
    from collections import Counter
    from sympy.utilities.iterables import partitions
    def A364464(n): return sum(1 for s,p in map(lambda x: (x[0],tuple(sorted(Counter(x[1]).elements()))), filter(lambda p:max(p[1].values(),default=1)==1,partitions(n,size=True))) if set(p).isdisjoint({p[i+1]-p[i] for i in range(s-1)})) # Chai Wah Wu, Sep 26 2023

A364466 Number of subsets of {1..n} where some element is a difference of two consecutive elements.

Original entry on oeis.org

0, 0, 1, 2, 6, 14, 34, 74, 164, 345, 734, 1523, 3161, 6488, 13302, 27104, 55150, 111823, 226443, 457586, 923721, 1862183, 3751130, 7549354, 15184291, 30521675, 61322711, 123151315, 247230601, 496158486, 995447739, 1996668494, 4004044396, 8027966324, 16092990132, 32255168125
Offset: 0

Views

Author

Gus Wiseman, Jul 31 2023

Keywords

Comments

In other words, the elements are not disjoint from their own first differences.

Examples

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

Crossrefs

For differences of all pairs we have A093971, complement A196723.
For partitions we have A363260, complement A364467.
The complement is counted by A364463.
For subset-sums instead of differences we have A364534, complement A325864.
For strict partitions we have A364536, complement A364464.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A050291 counts double-free subsets, complement A088808.
A108917 counts knapsack partitions, strict A275972.
A325325 counts partitions with all distinct differences, strict A320347.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Differences[#]]!={}&]],{n,0,10}]
  • Python
    from itertools import combinations
    def A364466(n): return sum(1 for l in range(n+1) for c in combinations(range(1,n+1),l) if not set(c).isdisjoint({c[i+1]-c[i] for i in range(l-1)})) # Chai Wah Wu, Sep 26 2023

Formula

a(n) = 2^n - A364463(n). - Chai Wah Wu, Sep 26 2023

Extensions

a(21)-a(32) from Chai Wah Wu, Sep 26 2023
a(33)-a(35) from Chai Wah Wu, Sep 27 2023

A364467 Number of integer partitions of n where some part is the difference of two consecutive parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 5, 9, 13, 21, 28, 42, 55, 78, 106, 144, 187, 255, 325, 429, 554, 717, 906, 1165, 1460, 1853, 2308, 2899, 3582, 4468, 5489, 6779, 8291, 10173, 12363, 15079, 18247, 22124, 26645, 32147, 38555, 46285, 55310, 66093, 78684, 93674, 111104
Offset: 0

Views

Author

Gus Wiseman, Jul 31 2023

Keywords

Comments

In other words, the parts are not disjoint from their own first differences.

Examples

			The a(3) = 1 through a(9) = 13 partitions:
  (21)  (211)  (221)   (42)     (421)     (422)      (63)
               (2111)  (321)    (2221)    (431)      (621)
                       (2211)   (3211)    (521)      (3321)
                       (21111)  (22111)   (3221)     (4221)
                                (211111)  (4211)     (4311)
                                          (22211)    (5211)
                                          (32111)    (22221)
                                          (221111)   (32211)
                                          (2111111)  (42111)
                                                     (222111)
                                                     (321111)
                                                     (2211111)
                                                     (21111111)
		

Crossrefs

For all differences of pairs parts we have A363225, complement A364345.
The complement is counted by A363260.
For subsets of {1..n} we have A364466, complement A364463.
The strict case is A364536, complement A364464.
These partitions have ranks A364537.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A050291 counts double-free subsets, complement A088808.
A323092 counts double-free partitions, ranks A320340.
A325325 counts partitions with distinct first differences.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Intersection[#,-Differences[#]]!={}&]],{n,0,30}]
  • Python
    from collections import Counter
    from sympy.utilities.iterables import partitions
    def A364467(n): return sum(1 for s,p in map(lambda x: (x[0],tuple(sorted(Counter(x[1]).elements()))), partitions(n,size=True)) if not set(p).isdisjoint({p[i+1]-p[i] for i in range(s-1)})) # Chai Wah Wu, Sep 26 2023
Showing 1-10 of 19 results. Next