

A226084


Number of partitions of n with Cookie Monster number 2.


2



0, 0, 1, 2, 5, 7, 12, 16, 21, 29, 35, 43, 51, 66, 68, 88, 92, 117, 117, 145, 146, 185, 176, 223, 207, 267, 254, 310, 287, 368, 330, 416, 392, 476, 418, 555, 477, 603, 560, 669, 590, 770, 651, 829, 753, 902, 782, 1039, 846, 1071
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

Given a set of integers representing the number of cookies in jars, The Cookie Monster number is the minimum number of moves Cookie Monster must use to empty the jars when in one move he may choose any subset of jars and take the same number of cookies from each of those jars.
Partitions have Cookie Monster number 2 if either they have two distinct values, or they have three distinct values, where the largest value is the sum of the other two.


LINKS



EXAMPLE

If there are 7 cookies, the total number of partitions is 15. Two partitions, (1,1,1,1,1,1,1) and (7), correspond to Cookie Monster number 1 (they have one value). One partition (1,2,4) has Cookie Monster number 3 (it has three values and the largest is not the sum of the other two). Other partitions have Cookie Monster number 2, so a(7)=12.


MATHEMATICA

Table[Length[
Select[IntegerPartitions[n],
Length[Union[#]] ==
2  (Length[Union[#]] == 3 &&
Union[#][[3]] == Union[#][[1]] + Union[#][[2]]) &]], {n, 50}]


PROG

(PARI) a(n)={sum(k=1, n1, sumdiv(k, i, sumdiv(nk, j, if(i<j, min(k/i, (nk)/j)))))} \\ Andrew Howroyd, Apr 29 2020


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



