Find the number of way to represent 1 0 0 as a sum of distinct positive integers that are not divisible by primes strictly greater than 3 .
Details and assumptions
Clarification: The order of the summands does not matter, but they must be distinct. For example, 6 can be represented in this manner in three different ways: 1 + 2 + 3 , 2 + 4 , 6 . The sum 1 + 1 + 4 does not count because the summands are not distinct.
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.
This was converted from Jared's comment.
This is the same as counting the number of polynomials (of any degree) with non-negative coefficients such that P ( 3 ) = 1 0 0 . Fan Zhang noticed something similar in another comment.
To see why it is the same, in any particular partition we can group all of the terms of the form 2 i , and add them together; this is the coefficient of 3 0 . And then we can group all terms of the form 3 . 2 i and write them as 3 k , where k is the coefficient of 3 1 , etc.
Since there's a bijection between sums of distinct powers of 2 , and non-negative integers (aka. the binary representation), there's a bijection between polynomials and these partitions where all terms are 3 j 2 i .
However, I wasn't able to come up with any way of counting these polynomials that is simpler than what you posted.
One interesting thing is that there are two different ways to count polynomials and each of them give sums which are conjugates of each other. For example if we use the notation f ( 2 , 3 0 ) to mean the number of polynomials of degree at most 2 such that P ( 3 ) = 3 0 , then we can write this in two ways; the first is equivalent to counting by iterating from the highest degree, and the second equivalent to counting by iterating from the lowest degree and dividing by 3 to reduce the degree by one: f ( 2 , 3 0 ) = f ( 1 , 3 0 ) + f ( 1 , 2 1 ) + f ( 1 , 1 2 ) + f ( 1 , 3 ) = 1 1 + 8 + 5 + 2 or f ( 2 , 3 0 ) = f ( 1 , 1 0 ) + f ( 1 , 9 ) + f ( 1 , 8 ) + . . . + f ( 1 , 0 ) = 4 + 4 + 3 + 3 + 3 + 2 + 2 + 2 + 1 + 1 + 1
If you draw a partition diagram for these two ways of computing f ( 2 , 3 0 ) then the first way is counting the rows and the second way is counting the columns.
I couldn't find any way of using this fact but I would love to discover if there is a simpler formula for f ( d , n ) !
Using generating functions:
We must partition 100 using parts in the form of $$2^{a}3^{b}, \space 0 \leq a \leq 6, \space 0 \leq b \leq 4$$ Let S be the set of all such numbers less than 100.
Then we are looking for the coefficient of x^100 in $$\prod_{i \in S} (1 + x^{i}) $$
This can be verified using a computer to be 402.
So this is hardly a graceful solution, but anyhow....
Noting that each summand has only prime factors 2 and 3 (or neither) gives this as a complete list: 1 , 2 , 3 , 4 , 6 , 8 , 9 , 1 2 , 1 8 , 1 6 , 2 4 , 2 7 , 3 2 , 3 6 , 4 8 , 5 4 , 6 4 , 7 2 , 8 1 , 9 6 .
At this point, you cheat monumentally by simply finding the co-efficient of 100 in the expansion of this ridiculous polynomial:
( 1 + x ) ( 1 + x 2 ) ( 1 + x 3 ) ( 1 + x 4 ) ( 1 + x 6 ) ( 1 + x 8 ) ( 1 + x 9 ) ( 1 + x 1 2 ) ( 1 + x 1 6 ) ( 1 + x 1 8 ) ( 1 + x 2 4 ) ( 1 + x 2 7 ) ( 1 + x 3 2 ) ( 1 + x 3 6 ) ( 1 + x 4 8 ) ( 1 + x 5 4 ) ( 1 + x 6 4 ) ( 1 + x 7 2 ) ( 1 + x 8 1 ) ( 1 + x 9 6 )
This gives an answer of 4 0
Of course, this solution is awful, so please ofter a better alternative!
Are there any interesting (reasonably fast) methods of computing the coefficient of x 1 0 0 in that expansion without using a computer?
Log in to reply
I'd love to know too...
I guess you could expand from right to left, discarding terms whose powers are too high. Still a lot of work though. This probably still doesn't qualify as interesting or reasonably fast.
I am not sure but is it possible to use generating functions in this case?
Log in to reply
I tried expressing the long expression (in the solution provided by David T.) as x − 1 x 2 − 1 x 2 − 1 x 4 − 1 . . . x 9 6 − 1 x 1 9 2 − 1 = ( x − 1 ) ( x 3 − 1 ) ( x 9 − 1 ) ( x 2 7 − 1 ) ( x 8 1 − 1 ) ( x 1 0 8 − 1 ) ( x 1 2 8 − 1 ) ( x 1 4 4 − 1 ) ( x 1 6 2 − 1 ) ( x 1 9 2 − 1 ) . Then I observed that this whole expression just equals to ( 1 + x + x 2 + x 3 + . . . + x 1 2 7 ) ( 1 + x 3 + x 3 × 2 + . . . + x 1 8 9 ) ( 1 + x 9 + x 9 × 2 + . . . + x 1 3 5 ) ( 1 + x 2 7 + x 5 4 + x 8 1 ) ( 1 + x 8 1 ) .
From this, i am not sure but to find the coefficient of 100, is the answer just the number of ordered pairs a 0 , a 1 , a 2 , a 3 , a 4 that satisfies a 0 + 3 a 1 + 9 a 2 + 2 7 a 3 + 8 1 a 4 = 1 0 0 ?
Can someone correct me if I am wrong because I am really confused now and really need some enlightenment. Thank you,
Log in to reply
@Fan Zhang – The answer is indeed that number of ordered pairs, as the generating function for this problem is: ( 1 − x ) ( 1 − x 3 ) ( 1 − x 9 ) ( 1 − x 2 7 ) … 1
I'm not enough of a practitioner of genfuncs to give a nice way of finding the n th coefficient, but I'm fairly sure that this way would more easily lead to the recurrence expressed by Jared Low as v ( n ) = ∑ i = 0 ⌊ n / 3 ⌋ v ( i ) .
I thought some one was going to post something akin to my solution, but it seems I was wrong...
Define v ( n ) to be the number of such ways for n ∈ Z + to be expressed as above. Suppose we want to partition our said sum into 2 parts: One part of the sum consists of terms divisible by 3, the other consists of terms not divisible by 3. In particular, our latter group of terms will consist of terms of form 2 x , where x ∈ Z + ∪ { 0 } .
Our latter part will have a unique sum of terms, since it is well known that for any n ∈ Z + it can be uniquely expressed as the sum of distinct terms of form 2 x , where x ∈ Z + ∪ { 0 } . (Just convert to binary to find said sum of powers of 2, with 1 if odd)
We need to find all such sums that are partitioned as above where the first group of terms would sum to 3 m , where m ∈ Z + ∪ { 0 } . For n = 1 0 0 there are 3 4 such groupings, where the first group sums to 3 m and the second group sums to 1 0 0 − 3 m where m is a non-negative integer and 0 ≤ m ≤ 3 3 . Since we know from the previous paragraph that the second group has a unique sum, we hence only need to focus on the first group.
Now, the number of ways to find a sum of 3 m with the terms following the above conditions as well as being divisible by 3 is equivalent to finding v ( m ) for 0 ≤ m ≤ 3 3 . We thus need to find i = 0 ∑ 3 3 v ( i ) . Note that by using analogous reasoning above for n in general, we have v ( 3 l ) = v ( 3 l + 1 ) = v ( 3 l + 2 ) for l ∈ Z + ∪ { 0 } , since we have v ( n ) = i = 0 ∑ ⌊ n / 3 ⌋ v ( i ) (we only focus on the first group of terms that has a sum of form 3 m where m ∈ Z + ∪ { 0 } ). Then, our summation reduces to 3 ( i = 0 ∑ 1 0 v ( 3 i ) ) + v ( 3 3 ) .
By using the same reasoning again on our now-reduced summation, where we substitute v ( 3 i ) = j = 0 ∑ i v ( j ) , we can reduce our summation further to v ( 1 0 0 ) = i = 0 ∑ 1 1 ( ( 1 2 − i ) ∗ v ( i ) ) + i = 0 ∑ 1 0 ( ( 1 1 − i ) ∗ v ( i ) )
It's not hard to figure out through a few sums that we have v ( 0 ) = v ( 1 ) = v ( 2 ) = 1 , v ( 3 ) = v ( 4 ) = v ( 5 ) = 2 , v ( 6 ) = v ( 7 ) = v ( 8 ) = 3 , v ( 9 ) = v ( 1 0 ) = v ( 1 1 ) = 5 . Plugging in these values to the above sum, we get 4 0 2
Your answer would include sets other than 3-number sets that add up to 100. For example: 1+2+16+81. Anyway, smart way!
Problem Loading...
Note Loading...
Set Loading...
Define v ( n ) to be the number of such ways for n ∈ Z + to be expressed as above. Suppose we want to partition our said sum into 2 parts: One part of the sum consists of terms divisible by 3, the other consists of terms not divisible by 3. In particular, our latter group of terms will consist of terms of form 2 x , where x ∈ Z + ∪ { 0 } .
Our latter part will have a unique sum of terms, since it is well known that for any n ∈ Z + it can be uniquely expressed as the sum of distinct terms of form 2 x , where x ∈ Z + ∪ { 0 } . (Just convert to binary to find said sum of powers of 2, with 1 if odd)
We need to find all such sums that are partitioned as above where the first group of terms would sum to 3 m , where m ∈ Z + ∪ { 0 } . For n = 1 0 0 there are 3 4 such groupings, where the first group sums to 3 m and the second group sums to 1 0 0 − 3 m where m is a non-negative integer and 0 ≤ m ≤ 3 3 . Since we know from the previous paragraph that the second group has a unique sum, we hence only need to focus on the first group.
Now, the number of ways to find a sum of 3 m with the terms following the above conditions as well as being divisible by 3 is equivalent to finding v ( m ) for 0 ≤ m ≤ 3 3 . We thus need to find i = 0 ∑ 3 3 v ( i ) . Note that by using analogous reasoning above for n in general, we have v ( 3 l ) = v ( 3 l + 1 ) = v ( 3 l + 2 ) for l ∈ Z + ∪ { 0 } , since we have v ( n ) = i = 0 ∑ ⌊ n / 3 ⌋ v ( i ) (we only focus on the first group of terms that has a sum of form 3 m where m ∈ Z + ∪ { 0 } ). Then, our summation reduces to 3 ( i = 0 ∑ 1 0 v ( 3 i ) ) + v ( 3 3 ) .
By using the same reasoning again on our now-reduced summation, where we substitute v ( 3 i ) = j = 0 ∑ i v ( j ) , we can reduce our summation further to v ( 1 0 0 ) = i = 0 ∑ 1 1 ( ( 1 2 − i ) ∗ v ( i ) ) + i = 0 ∑ 1 0 ( ( 1 1 − i ) ∗ v ( i ) )
It's not hard to figure out through a few sums that we have v ( 0 ) = v ( 1 ) = v ( 2 ) = 1 , v ( 3 ) = v ( 4 ) = v ( 5 ) = 2 , v ( 6 ) = v ( 7 ) = v ( 8 ) = 3 , v ( 9 ) = v ( 1 0 ) = v ( 1 1 ) = 5 . Plugging in these values to the above sum, we get 4 0 2