A student asked me the other day the following rather homework-looking question: Given a natural number , how many solutions does the equation

have for and natural numbers?

The question has a very easy answer: Simply notice that and that any like this determines a unique such that is a solution. So, there are solutions if is even (as can be any of ), and there are solutions if is odd.

I didn’t tell the student what the answer is, but I asked what he had tried so far. Among what he showed me there was a piece of paper in which somebody else had scribbled

which caught my interest, and is the reason for this posting.

I don’t think the student had seen the connection between this product of two series, let’s call it , and his question. If we denote by the number of solutions to the equation, the series is the generating function of the sequence , i.e.,

To see this, notice that the coefficient of in is precisely the number of ways we can write as a product of a term from the first series and a term from the second one, i.e., it is the number of solutions with and natural numbers to the equation or, equivalently, . That is to say, the coefficient of in is exactly .

This gives us a purely algebraic (analytic?) way of solving the question, even if there is no understanding of how to approach it from a combinatorial point of view.

Both series on the product that makes up are geometric series, so we have

that of course coincides with the formula we obtained earlier by combinatorial considerations.

The question the student had is a very simple example of a problem about integer partitions, a beautiful area of mathematics that I hope I am not misconstruing by thinking of it as a branch of combinatorial number theory. The technique of generating functions is a very useful and powerful combinatorial tool that I have always found quite nice although, granted, its use is a bit of an overkill for the question at hand. At the same time, this technique provides us with a (standard) method for solving any problem of the same kind: For fixed natural numbers , find for each the number of tuples of natural numbers such that

One can then go further to study the much subtler partition function and its relatives.

(And I still don’t know the name of the student, who didn’t bother to introduce himself, and I have no idea who suggested to him to look at to begin with.)

Well, I got the partial solution finally, here is the question that I tried to solve by the equation x + 2y = n, x,y,n > 0

Let n be a positive integer. Harry’s school year has n school days. Harry has budget of exactly $n for buying exactly one snack per day at school. There are only two types of snacks available: M&M for $1. 00 per packet, or a pair of bananas at $2.00 per pair. The following restrictions must apply to Harry.

(1) Harry must spend all $n on snacks during the school year.

(2) Harry does not have to buy a snack each school day.

At the end of the school year, Harry must report how many times he bought M&M, and how many times he bought bananas. How many different reports are possible?

Anyway, thank you for your posting 🙂 It helps me to understand the solution better.

[…] while ago I posted a short note on integer partitions and generating functions. I am adding a link here, as it is obviously connected to the combinatorial applications of power series we have been […]

It is not possible to provide an explicit expression for a non-linear solution. The reason is that (it is a folklore result that) an additive $f:{\mathbb R}\to{\mathbb R}$ is linear iff it is measurable. (This result can be found in a variety of places, it is a standard exercise in measure theory books. As of this writing, there is a short proof here (Intern […]

I learned of this problem through Su Gao, who heard of it years ago while a post-doc at Caltech. David Gale introduced this game in the 70s, I believe. I am only aware of two references in print: Richard K. Guy. Unsolved problems in combinatorial games. In Games of No Chance, (R. J. Nowakowski ed.) MSRI Publications 29, Cambridge University Press, 1996, pp. […]

Let $C$ be the standard Cantor middle-third set. As a consequence of the Baire category theorem, there are numbers $r$ such that $C+r$ consists solely of irrational numbers, see here. What would be an explicit example of a number $r$ with this property? Short of an explicit example, are there any references addressing this question? A natural approach would […]

Suppose $M$ is an inner model (of $\mathsf{ZF}$) with the same reals as $V$, and let $A\subseteq \mathbb R$ be a set of reals in $M$. Suppose further that $A$ is determined in $M$. Under these assumptions, $A$ is also determined in $V$. The point is that since winning strategies are coded by reals, and any possible run of the game for $A$ is coded by a real, […]

Yes. This is obvious if there are no such cardinals. (I assume that the natural numbers of the universe of sets are the true natural numbers. Otherwise, the answer is no, and there is not much else to do.) Assume now that there are such cardinals, and that "large cardinal axiom" is something reasonable (so, provably in $\mathsf{ZFC}$, the relevant […]

The two concepts are different. For example, $\omega$, the first infinite ordinal, is the standard example of an inductive set according to the first definition, but is not inductive in the second sense. In fact, no set can be inductive in both senses (any such putative set would contain all ordinals). In the context of set theory, the usual use of the term […]

I will show that for any positive integers $n,\ell,k$ there is an $M$ so large that for all positive integers $i$, if $i/M\le \ell$, then the difference $$ \left(\frac iM\right)^n-\left(\frac{i-1}M\right)^n $$ is less than $1/k$. Let's prove this first, and then argue that the result follows from it. Note that $$ (i+1)^n-i^n=\sum_{k=0}^{n-1}\binom nk i^ […]

I think it is cleaner to argue without induction. If $n$ is a positive integer and $n\ge 8$, then $7n$ is both less than $n^2$ and a multiple of $n$, so at most $n^2-n$ and therefore $7n+1$ is at most $n^2-n+1

Let PRA be the theory of Primitive recursive arithmetic. This is a subtheory of PA, and it suffices to prove the incompleteness theorem. It is perhaps not the easiest theory to work with, but the point is that a proof of incompleteness can be carried out in a significantly weaker system than the theories to which incompleteness actually applies. It is someti […]

Here is a silly thing; I am not sure it is an "advantage" (or, for that matter, a disadvantage), but it indicates a difference: Inside a model $M$ of $\mathsf{ZF}$ there may be "hidden'' models $N$ of $\mathsf{ZF}$. The situation I have in mind is something like the following, which uses the fact that $\mathsf{ZF}$ is not finitely ax […]

I’m the student asked the question 😉

Well, I got the partial solution finally, here is the question that I tried to solve by the equation x + 2y = n, x,y,n > 0

Let n be a positive integer. Harry’s school year has n school days. Harry has budget of exactly $n for buying exactly one snack per day at school. There are only two types of snacks available: M&M for $1. 00 per packet, or a pair of bananas at $2.00 per pair. The following restrictions must apply to Harry.

(1) Harry must spend all $n on snacks during the school year.

(2) Harry does not have to buy a snack each school day.

At the end of the school year, Harry must report how many times he bought M&M, and how many times he bought bananas. How many different reports are possible?

Anyway, thank you for your posting 🙂 It helps me to understand the solution better.

Hi Eliot,

I’m glad this helped. Marion mentioned to me the `M&Ms problem’ the other day, I figured this was the same question without distractions.

[…] while ago I posted a short note on integer partitions and generating functions. I am adding a link here, as it is obviously connected to the combinatorial applications of power series we have been […]