%I #15 Apr 29 2020 12:13:58
%S 0,0,1,2,5,7,12,16,21,29,35,43,51,66,68,88,92,117,117,145,146,185,176,
%T 223,207,267,254,310,287,368,330,416,392,476,418,555,477,603,560,669,
%U 590,770,651,829,753,902,782,1039,846,1071
%N Number of partitions of n with Cookie Monster number 2.
%C 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.
%C 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.
%H Andrew Howroyd, <a href="/A226084/b226084.txt">Table of n, a(n) for n = 1..1000</a>
%H L. M. Braswell and T. Khovanova, <a href="http://arxiv.org/abs/1305.4305">Cookie Monster Devours Naccis</a>, arXiv:1305.4305 [math.HO], 2013.
%e 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.
%t Table[Length[
%t Select[IntegerPartitions[n],
%t Length[Union[#]] ==
%t 2 || (Length[Union[#]] == 3 &&
%t Union[#][[3]] == Union[#][[1]] + Union[#][[2]]) &]], {n, 50}]
%o (PARI) a(n)={sum(k=1, n-1, sumdiv(k, i, sumdiv(n-k, j, if(i<j, min(k/i, (n-k)/j)))))} \\ _Andrew Howroyd_, Apr 29 2020
%Y Cf. A000041, A226107.
%K nonn
%O 1,4
%A _Leigh Marie Braswell_ and _Tanya Khovanova_, May 25 2013