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

A126796 Number of complete partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 5, 8, 10, 16, 20, 31, 39, 55, 71, 100, 125, 173, 218, 291, 366, 483, 600, 784, 971, 1244, 1538, 1957, 2395, 3023, 3693, 4605, 5604, 6942, 8397, 10347, 12471, 15235, 18309, 22267, 26619, 32219, 38414, 46216, 54941, 65838, 77958, 93076, 109908
Offset: 0

Views

Author

Brian Hopkins, Feb 20 2007

Keywords

Comments

A partition of n is complete if every number 1 to n can be represented as a sum of parts of the partition. This generalizes perfect partitions, where the representation for each number must be unique.
A partition is complete iff each part is no more than 1 more than the sum of all smaller parts. (This includes the smallest part, which thus must be 1.) - Franklin T. Adams-Watters, Mar 22 2007
For n > 0: a(n) = sum of n-th row in A261036 and also a(floor(n/2)) = A261036(n,floor((n+1)/2)). - Reinhard Zumkeller, Aug 08 2015
a(n+1) is the number of partitions of n such that each part is no more than 2 more than the sum of all smaller parts (generalizing Adams-Watters's criterion). Bijection: each partition counted by a(n+1) must contain a 1, removing that gives a desired partition of n. - Brian Hopkins, May 16 2017
A partition (x_1, ..., x_k) is complete if and only if 1, x_1, ..., x_k is a "regular sequence" (see A003513 for definition). As a result, the number of complete partitions with n parts is given by A003513(n+1). - Nathaniel Johnston, Jun 29 2023

Examples

			There are a(5) = 4 complete partitions of 5:
  [1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 2, 2], and [1, 1, 3].
G.f.: 1 = 1*(1-x) + 1*x*(1-x)*(1-x^2) + 1*x^2*(1-x)*(1-x^2)*(1-x^3) + 2*x^3*(1-x)*(1-x^2)*(1-x^3)*(1-x^4) + 2*x^4*(1-x)*(1-x^2)*(1-x^3)*(1-x^4)*(1-x^5) + ...
From _Gus Wiseman_, Oct 14 2023: (Start)
The a(1) = 1 through a(8) = 10 partitions:
  (1)  (11)  (21)   (211)   (221)    (321)     (421)      (3221)
             (111)  (1111)  (311)    (2211)    (2221)     (3311)
                            (2111)   (3111)    (3211)     (4211)
                            (11111)  (21111)   (4111)     (22211)
                                     (111111)  (22111)    (32111)
                                               (31111)    (41111)
                                               (211111)   (221111)
                                               (1111111)  (311111)
                                                          (2111111)
                                                          (11111111)
(End)
		

Crossrefs

For parts instead of sums we have A000009 (sc. coverings), ranks A055932.
The strict case is A188431, complement A365831.
These partitions have ranks A325781.
First column k = 0 of A365923.
The complement is counted by A365924, ranks A365830.

Programs

  • Haskell
    import Data.MemoCombinators (memo3, integral, Memo)
    a126796 n = a126796_list !! n
    a126796_list = map (pMemo 1 1) [0..] where
       pMemo = memo3 integral integral integral p
       p   0 = 1
       p s k m
         | k > min m s = 0
         | otherwise   = pMemo (s + k) k (m - k) + pMemo s (k + 1) m
    -- Reinhard Zumkeller, Aug 07 2015
  • Maple
    isCompl := proc(p,n) local m,pers,reps,f,lst,s; reps := {}; pers := combinat[permute](p); for m from 1 to nops(pers) do lst := op(m,pers); for f from 1 to nops(lst) do s := add( op(i,lst),i=1..f); reps := reps union {s}; od; od; for m from 1 to n do if not m in reps then RETURN(false); fi; od; RETURN(true); end: A126796 := proc(n) local prts, res,p; prts := combinat[partition](n); res :=0; for p from 1 to nops(prts) do if isCompl(op(p,prts),n) then res := res+1; fi; od; RETURN(res); end: for n from 1 to 40 do printf("%d %d ",n,A126796(n)); od; # R. J. Mathar, Feb 27 2007
    # At the beginning of the 2nd Maple program replace the current 15 by any other positive integer n in order to obtain a(n). - Emeric Deutsch, Mar 04 2007
    with(combinat): a:=proc(n) local P,b,k,p,S,j: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: end: seq(a(n),n=1..30); # Emeric Deutsch, Mar 04 2007
    with(combinat): n:=15: P:=partition(n): b:=0: for k from 1 to numbpart(n) do p:=powerset(P[k]): S:={}: for j from 1 to nops(p) do S:=S union {add(p[j][i],i=1..nops(p[j]))} od: if nops(S)=n+1 then b:=b+1 else b:=b: fi: od: b; # Emeric Deutsch, Mar 04 2007
  • Mathematica
    T[n_, k_] := T[n, k] = If[k <= 1, 1, If[n < 2k-1, T[n, Floor[(n+1)/2]], T[n, k-1] + T[n-k, k]]];
    a[n_] := T[n, Floor[(n+1)/2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Apr 11 2017, after Franklin T. Adams-Watters *)
    nmz[y_]:=Complement[Range[Total[y]], Total/@Subsets[y]]; Table[Length[Select[IntegerPartitions[n], nmz[#]=={}&]],{n,0,15}] (* Gus Wiseman, Oct 14 2023 *)
  • PARI
    {T(n,k)=if(k<=1,1,if(n<2*k-1,T(n,floor((n+1)/2)),T(n,k-1)+T(n-k,k)))}
    {a(n)=T(n,floor((n+1)/2))} /* If modified to save earlier results, this would be efficient. */ /* Franklin T. Adams-Watters, Mar 22 2007 */
    
  • PARI
    /* As coefficients in g.f.: */
    {a(n)=local(A=[1,1]);for(i=1,n+1,A=concat(A,0);A[#A]=polcoeff(1-sum(m=1,#A,A[m]*x^m*prod(k=1,m,1-x^k +x*O(x^#A))),#A) );A[n+1]}
    for(n=0,50,print1(a(n),",")) /* Paul D. Hanna, Mar 06 2012 */
    

Formula

G.f.: 1 = Sum_{n>=0} a(n)*x^n*Product_{k=1..n+1} (1-x^k). - Paul D. Hanna, Mar 08 2012
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n) * (1 - (sqrt(3/2)/Pi + 25*Pi/(24*sqrt(6))) / sqrt(n) + (25/16 - 1679*Pi^2/6912)/n). - Vaclav Kotesovec, May 24 2018, extended Nov 02 2019
a(n) = A000041(n) - A365924(n). - Gus Wiseman, Oct 14 2023

Extensions

More terms from R. J. Mathar, Feb 27 2007
More terms from Emeric Deutsch, Mar 04 2007
Further terms from Franklin T. Adams-Watters and David W. Wilson, Mar 22 2007

A367402 Number of integer partitions of n whose semi-sums cover an interval of positive integers.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 9, 10, 13, 17, 20, 26, 31, 38, 44, 58, 64, 81, 95, 116, 137, 166, 192, 233, 278, 330, 385, 459, 542, 636, 759, 879, 1038, 1211, 1418, 1656, 1942, 2242, 2618, 3029, 3535, 4060, 4735, 5429, 6299, 7231, 8346, 9556, 11031, 12593, 14482, 16525
Offset: 0

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-sums {2,3,4,5}, which is an interval, so y is counted under a(7).
The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (21)   (22)    (32)     (33)      (43)       (44)
             (111)  (31)    (41)     (42)      (52)       (53)
                    (211)   (221)    (51)      (61)       (62)
                    (1111)  (2111)   (222)     (322)      (71)
                            (11111)  (321)     (2221)     (332)
                                     (2211)    (3211)     (2222)
                                     (21111)   (22111)    (3221)
                                     (111111)  (211111)   (22211)
                                               (1111111)  (32111)
                                                          (221111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

For parts instead of sums we have A034296, ranks A073491.
For all subset-sums we have A126796, ranks A325781, strict A188431.
The complement for parts instead of sums is A239955, ranks A073492.
The complement for all sub-sums is A365924, ranks A365830, strict A365831.
The complement is counted by A367403.
The strict case is A367410, complement A367411.
A000009 counts partitions covering an initial interval, ranks A055932.
A086971 counts semi-sums of prime indices.
A261036 counts complete partitions by maximum.
A276024 counts positive subset-sums of partitions, strict A284640.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], (d=Total/@Subsets[#,{2}];If[d=={}, {}, Range[Min@@d,Max@@d]]==Union[d])&]], {n,0,15}]

A367403 Number of integer partitions of n whose semi-sums do not cover an interval of positive integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 5, 9, 13, 22, 30, 46, 63, 91, 118, 167, 216, 290, 374, 490, 626, 810, 1022, 1297, 1628, 2051, 2551, 3176, 3929, 4845, 5963, 7311, 8932, 10892, 13227, 16035, 19395, 23397, 28156, 33803, 40523, 48439, 57832, 68876, 81903, 97212, 115198
Offset: 0

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 a(0) = 0 through a(9) = 13 partitions:
  .  .  .  .  .  (311)  (411)   (331)    (422)     (441)
                        (3111)  (421)    (431)     (522)
                                (511)    (521)     (531)
                                (4111)   (611)     (621)
                                (31111)  (3311)    (711)
                                         (4211)    (4311)
                                         (5111)    (5211)
                                         (41111)   (6111)
                                         (311111)  (33111)
                                                   (42111)
                                                   (51111)
                                                   (411111)
                                                   (3111111)
		

Crossrefs

The complement for parts instead of sums is A034296, ranks A073491.
The complement for all sub-sums is A126796, ranks A325781, strict A188431.
For parts instead of sums we have A239955, ranks A073492.
For all subset-sums we have A365924, ranks A365830, strict A365831.
The complement is counted by A367402.
The strict case is A367411, complement A367410.
A000009 counts partitions covering an initial interval, ranks A055932.
A086971 counts semi-sums of prime indices.
A261036 counts complete partitions by maximum.
A276024 counts positive subset-sums of partitions, strict A284640.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], (d=Total/@Subsets[#,{2}];If[d=={}, {}, Range[Min@@d,Max@@d]]!=Union[d])&]], {n,0,15}]

A367410 Number of strict integer partitions of n whose semi-sums cover an interval of positive integers.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 6, 6, 7, 7, 8, 8, 11, 9, 11, 11, 12, 12, 15, 14, 15, 16, 16, 16, 19, 18, 19, 22, 21, 21, 24, 22, 25, 26, 26, 26, 30, 28, 29, 32, 31, 32, 37, 35, 36, 38, 39, 39, 43, 42, 43, 47, 46, 49, 51, 52, 51, 58
Offset: 0

Views

Author

Gus Wiseman, Nov 18 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 = (4,2,1) has semi-sums {3,5,6} which are missing 4, so y is not counted under a(7).
The a(1) = 1 through a(9) = 6 partitions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)    (8)    (9)
            (2,1)  (3,1)  (3,2)  (4,2)    (4,3)  (5,3)  (5,4)
                          (4,1)  (5,1)    (5,2)  (6,2)  (6,3)
                                 (3,2,1)  (6,1)  (7,1)  (7,2)
                                                        (8,1)
                                                        (4,3,2)
		

Crossrefs

For parts instead of sums we have A001227:
- non-strict A034296, ranks A073491
- complement A238007
- non-strict complement A239955, ranks A073492
The non-binary version is A188431:
- non-strict A126796, ranks A325781
- complement A365831
- non-strict complement A365924, ranks A365830
The non-strict version is A367402.
The non-strict complement is A367403.
The complement is counted by A367411.
A000009 counts partitions covering an initial interval, ranks A055932.
A046663 counts partitions w/o submultiset summing to k, strict A365663.
A365543 counts partitions w/ submultiset summing to k, strict A365661.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&(d=Total/@Subsets[#,{2}]; If[d=={},{}, Range[Min@@d, Max@@d]]==Union[d])&]], {n,0,30}]

A367411 Number of strict integer partitions of n whose semi-sums do not cover an interval of positive integers.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 4, 5, 8, 10, 14, 16, 23, 27, 35, 42, 52, 61, 75, 89, 106, 126, 149, 173, 204, 237, 274, 319, 369, 424, 490, 560, 642, 734, 838, 952, 1085, 1231, 1394, 1579, 1784, 2011, 2269, 2554, 2872, 3225, 3619, 4054, 4540, 5077, 5671, 6332
Offset: 0

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 = (4,2,1) has semi-sums {3,5,6} which are missing 4, so y is counted under a(7).
The a(7) = 1 through a(13) = 10 partitions:
  (4,2,1)  (4,3,1)  (5,3,1)  (5,3,2)  (5,4,2)  (6,4,2)    (6,4,3)
           (5,2,1)  (6,2,1)  (5,4,1)  (6,3,2)  (6,5,1)    (6,5,2)
                             (6,3,1)  (6,4,1)  (7,3,2)    (7,4,2)
                             (7,2,1)  (7,3,1)  (7,4,1)    (7,5,1)
                                      (8,2,1)  (8,3,1)    (8,3,2)
                                               (9,2,1)    (8,4,1)
                                               (5,4,2,1)  (9,3,1)
                                               (6,3,2,1)  (10,2,1)
                                                          (6,4,2,1)
                                                          (7,3,2,1)
		

Crossrefs

For parts instead of sums we have A238007:
- complement A001227
- non-strict complement A034296, ranks A073491
- non-strict A239955, ranks A073492
The non-strict version is A367403.
The non-strict complement is A367402.
The complement is counted by A367410.
The non-binary version is A365831:
- non-strict complement A126796, ranks A325781
- complement A188431
- non-strict A365924, ranks A365830
A000009 counts partitions covering an initial interval, ranks A055932.
A046663 counts partitions w/o submultiset summing to k, strict A365663.
A365543 counts partitions w/ submultiset summing to k, strict A365661.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], UnsameQ@@#&&(d=Total/@Subsets[#, {2}];If[d=={},{}, Range[Min@@d,Max@@d]]!=Union[d])&]], {n,0,30}]

A367106 Triangle read by rows where T(n,k) is the number of complete length-k integer partitions of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Nov 09 2023

Keywords

Comments

An integer partition of n is complete (ranks A325781) if every integer from 0 to n is the sum of some submultiset of the parts.

Examples

			Triangle begins:
  1
  0  1
  0  0  1
  0  0  1  1
  0  0  0  1  1
  0  0  0  2  1  1
  0  0  0  1  2  1  1
  0  0  0  1  3  2  1  1
  0  0  0  0  3  3  2  1  1
  0  0  0  0  4  5  3  2  1  1
  0  0  0  0  3  5  5  3  2  1  1
  0  0  0  0  4  8  7  5  3  2  1  1
  0  0  0  0  2  9  9  7  5  3  2  1  1
  0  0  0  0  2 11 12 11  7  5  3  2  1  1
  0  0  0  0  1 11 16 13 11  7  5  3  2  1  1
  0  0  0  0  1 14 21 19 15 11  7  5  3  2  1  1
Row n = 11 counts the following partitions (empty columns not shown):
  6311  62111  611111  5111111  41111111  311111111  2111111111  11111111111
  6221  53111  521111  4211111  32111111  221111111
  5321  52211  431111  3311111  22211111
  4421  44111  422111  3221111
        43211  332111  2222111
        42221  322211
        33311  222221
        33221
		

Crossrefs

Column k appears to have A000325(k) nonzero terms.
Column sums are A003513.
Central column T(2n,n) is A007042.
Row sums are A126796, ranks A325781.
The strict case is too sparse, row sums A188431 (complement A365831).
Grouping by maximum instead of length gives A261036.
A000041 counts integer partitions.
A108917 counts knapsack partitions, ranks A299702.
A299701 counts subset-sums of prime indices, firsts A259941.
A365924 counts incomplete partitions, ranks A365830.

Programs

  • Mathematica
    nmz[y_]:=Complement[Range[Total[y]],Total/@Subsets[y]];
    Table[Length[Select[IntegerPartitions[n,{k}],nmz[#]=={}&]],{n,0,15},{k,0,n}]
Showing 1-6 of 6 results.