- #1
Shoney45
- 68
- 0
Homework Statement
Show with generating functions that every positive integer can be written as a unique power of 2.
Homework Equations
The generating function for ar, the number of ways to write an integer r as a sum of distinct powers of 2 = g(x) = (1 + x)(1 + x^2)(1 + x^4)(1 + x^8)...(1 + x^2k)...
The Attempt at a Solution
This is an example from the text that is pretty crucial to understanding this section of my text. The book then goes on to say the following:
"To show that every integer can be written as a unique sum of distinct powers of 2, we must show that the coefficient of every power of x in g(x) is 1. That is, show that:
g(x) = 1 + x + x^2 + x^3 + ...= 1/(1-x)".
1) So my first problem is that I don't understand why g(x) is changing. The actual generating function is for powers of two. But for the above identity, the author is using the standard identity for the polynomial expansion of 1/(1-x)
I don't get it.
2) The identity [1 + x + x^2 + x^3 + ... = 1/(1-x)] can also be expressed as (1-x)*g(x) = 1. This is achieved by repeatedly using the factorization (1-x^k)(1+x^k) = 1-x^2k such that:
(1-x)*g(x) = (1 - x)(1 + x)(1 + x^2)(1 + x^4)(1 + x^8)...
= (1 - x^2)(1 + x^2)(1 + x^4)(1 + x^8)...
= (1 - x^4)(1 + x^4)(1 + x^8)...
.
.
.
= 1
My problem is that I can't understand how to make the final step that sets (1-x)*g(x) = 1. By my reckoning, if I keep on applying the identity, then I will keep on getting powers of (1 - x^2k), and I don't understand how that eventually becomes 1.
Last edited: