Let be the number of ways of distributing indistinguishable candies to distinguishable children so that each child receives at most two candies.
For example, if , then and . If the value of can be represented as for positive integers , where isn't a perfect power of an integer with , submit the value of as your answer.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Distribute the candies to the first 2 0 1 4 children freely; there are 3 choices for each child (zero, one, or two candies). There exists exactly one choice for the last child that will make the sum of candies congruent to 1 modulo 3 . All these configurations will count to Ω , and no other. This gives Ω = 3 2 0 1 4 , so A = 3 , B = 2 0 1 4 , A + B = 2 0 1 7 .