Restricted integer partition functions

For two sets $A$ and $M$ of positive integers and for a positive integer $n$, let $p(n,A,M)$ denote the number of partitions of $n$ with parts in $A$ and multiplicities in $M$, that is, the number of representations of $n$ in the form $n=\sum_{a \in A} m_a a$ where $m_a \in M \cup {0}$ for all $a$, and all numbers $m_a$ but finitely many are 0. It is shown that there are infinite sets $A$ and $M$ so that $p(n,A,M)=1$ for every positive integer $n$. This settles (in a strong form) a problem of Canfield and Wilf. It is also shown that there is an infinite set $M$ and constants $c$ and $n_0$ so that for $A={k!}_{k \geq 1}$ or for $A=\{k^k\}_{k \geq 1}$, $0n_0$. This answers a question of Ljuji\'c and Nathanson.


Introduction
For two sets A and M of positive integers and for a positive integer n, let p(n, A, M ) denote the number of representations of n in the form where m a ∈ M ∪ {0} for all a, and all numbers m a but finitely many are 0. We say that the function p = p(n, A, M ) has polynomial growth if there exists an absolute constant c and an integer n 0 so that p(n, A, M ) ≤ n c for all n > n 0 .Canfield and Wilf [2] raised the following question.
Question 1 [Canfield and Wilf [2]] Do there exist two infinite sets A and M so that p(n, A, M ) > 0 for all sufficiently large n and yet p has polynomial growth ?Ljujić and Nathanson [4] observed, among other things, that this cannot be the case if the set A has at least δ log n members in [n] = {1, 2, . . ., n} for all sufficiently large n, where δ > 0 is any positive constant, and asked the following two more specific questions.
Question 2 [Ljujić and Nathanson [4]] Let A = {k!} ∞ k=1 .Does there exist an infinite set M of positive integers so that p(n, A, M ) > 0 for all sufficiently large n, and p has polynomial growth ?Question 3 [Ljujić and Nathanson [4]] Let A = {k k } ∞ k=1 .Does there exist an infinite set M of positive integers so that p(n, A, M ) > 0 for all sufficiently large n and p has polynomial growth ?
In this note we prove that the answer to all three questions above is positive.
Our first result is simple, and shows that the answer to the first question is positive in the strongest possible way: there are infinite sets A and M so that p(n, A, M ) = 1 for all n.This is stated in the following Theorem.
Theorem 1.1 There are two infinite sequences of positive integers A and M so that p(n, A, M ) = 1 for every positive integer n.
The proof is by an explicit construction, which is general enough to give examples with sets A that grow at any desired rate which is faster than exponential.This rate of growth is tight, by the observation of Ljujić and Nathanson mentioned above.
We also prove the following result, which settles Questions 2 and 3.
Theorem 1.2 Let A be an infinite set of positive integers, and suppose that 1 ∈ A and where the o(1) term tends to 0 as n tends to infinity.Then there exists n 0 and an infinite set M of positive integers so that 0 < p(n, A, M ) < n 8+o (1) for all n > n 0 .
The upper estimate n 8+o (1) can be improved and we make no attempt to optimize it here.The proof of this theorem is probabilistic and can be easily modified to provide the existence of such sets M for many other sparse infinite sets A. The rest of this note is organized as follows.In Section 2 we present the simple proof of Theorem 1.1.In Section 3 we describe the probabilistic construction of the set M used in the proof of Theorem 1.2.The proof it satisfies the required properties and hence establishes Theorem 1.2 is described in Section 4. Section 5 contains some concluding remarks.
All logarithms throughout the paper are in base 2, unless otherwise specified.
2 The proof of Theorem 1.1 Proof.Let N ∪ {0} = B ∪ C, B ∩ C = ∅ be a partition of the set of all non-negative integers into two disjoint infinite sets B and C. Let be the set of all sums of powers of two in which each exponent lies in B. Similarly, put This is the set of all sums of powers of two in which each exponent is a member of C. Note that both D and E contain 0, as the sets B ′ and C ′ in their definition may be taken to be empty.Since every non-negative integer has a unique binary representation, it is clear that each such integer has a unique representation as a sum of an element of D and an element of E.
Define, now, Clearly both A and M are infinite.We claim that every positive integer has a unique representation of the form (1) with these A and M , that is, p(n, A, M ) = 1 for all n ≥ 1.Indeed, a general expression of the form a∈A m a a with m a ∈ M for all a satisfies Let n = 2 t 1 + 2 t 2 + . . .+ 2 tr be the binary representation of n, with 0 ≤ t 1 < t 2 < . . .< t r .By the fact that each nonnegative integer has a unique representation as a sum of an element of D and an element of E, there are, for each 1 ≤ j ≤ r, unique d i ∈ D and e i ∈ E so that t i = d i + e i .The elements d i are not necessarily distinct.Let D ′ = {d 1 , d 2 . . ., d r } be the set of all distinct ones.For each d ∈ D ′ define m 2 d = i:d i =d 2 e i and observe that Therefore n has a representation of the form (1). It is not difficult to check that this representation is unique, that is, the elements d and m 2 d in the expression above can be reconstructed in the unique way described above from the binary representation of n.This shows that indeed p(n, A, M ) = 1 for all n, completing the proof of Theorem 1.1.✷ Note that by choosing the set B so that |B ∩ {0, 1, . . ., r}| = r − g(r), where g(r) is an arbitrary monotone function of r that tends to infinity, and r − g(r) also tends to infinity in a monotone way, we get that for every integer r ≥ 1: showing that by an appropriate choice of g we can get sets A whose growth function is at least log n/w(n) for an arbitrary slowly growing function w(n).

The probabilistic construction
The set M defined for the proof of Theorem 1.2 is a union of the form M = ∪ a∈A M a .Each set M a is a union M a = ∪ i:2 i ≥a M a,i .Each of the sets M a,i is a random subset of [2 i ] obtained by picking each number in [2 i ], randomly and independently, to be a member of M a,i with probability i 6 2 i (if this ratio exceeds 1 then all members of [2 i ] lie in M a,i , clearly this happens only for finitely many values of i.) We claim that M satisfies the required properties with high probability (that is, with probability that tends to 1 as n 0 tends to infinity).This is proved in the next section.The fact that p = p(n, A, M ) has polynomial growth is simple: we show that with high probability the set M is sparse enough to ensure that the total number of expressions of the form (1) that are at most n does not exceed n 8+o (1) .The fact that with high probability p(n, A, M ) > 0 for all sufficiently large n is more complicated and requires some work.It turns out to be convenient to restrict attention to expressions (1) of a special form that enable us to control their behaviour in an effective manner.We can then apply the Janson Inequality (c.f., [1], Chapter 8) to derive the required result.
4 The proof of Theorem 1.2

Polynomial growth
Let A be as in Theorem 1.2, and let M = ∪ a∈A ∪ i:2 i ≥a M a,i be as in the previous section.In this subsection we show that with high probability the function p(n, A, M ) has polynomial growth.Lemma 4.1 For every ǫ > 0 there exists an n 0 = n 0 (ǫ) so that with probability at least 1 − ǫ, M is infinite and |M ∩ [n]| < log 8 n − 1 for all n > n 0 .
Proof.It is obvious that M is infinite with probability 1.We proceed to prove the main part of the lemma.
Let m be a sufficiently large integer.If Similarly, for a > m, P r[m ∈ M a ] < 3 log 6 a a .Summing over all a ∈ A, a > m and using the fact that A is sparse we conclude that P r[m ∈ ∪ a>m M a ] < 10 log 6 m m .Since there are o(log m) members of A that are smaller than m we also get that (since m is large) P r[m ∈ ∪ a≤m M a ] < 0.9 log 7 m m .Altogether, the probability that m lies in M = ∪ a M a does not exceed log 7 m m .It follows that the expected value of |M ∩ [n]| is smaller than O(1)+ 1 8 log 8 e n < 0.5 log 8 2 n (where the O(1) term is added to account for the small values of m).As this cardinality is a sum of independent random variables we can apply the Chernoff-Hoeffding Inequality (c.f., e.g., [1], Appendix A) and conclude that the probability that |M ∩ [n]| is at least log 8 n − 1 is at most e −Ω(log 8 n) .For sufficiently large n 0 the sum n≥n 0 e −Ω(log 8 n) < ǫ, completing the proof of the lemma.✷ Corollary 4.2 Let A and M be as above.For any ǫ > 0 there is an n 0 = n 0 (ǫ) so that with probability at least 1 − ǫ, M is infinite and n≤m p(n, A, M ) ≤ m 8+o (1) for all m > n 0 .
Proof.Let ǫ and n 0 = n 0 (ǫ) be as in Lemma 4.1 and suppose that M satisfies the assertion of the lemma (this happens with probability at least 1 − ǫ).Then, the number of representations of the form (1) of integers n that do not exceed m is at most | , as all coefficients m a and all numbers a with a nonzero coefficient must be at most m.This expression is at most (log 8 m) (1+o( 1)) log m/ log log m = m 8+o (1) , as needed.✷

Representing all large integers
In this subsection we prove that with high probability every sufficiently large number n has a representation of the form (1) where A and M are as above.To do so, it is convenient to insist on a representation of a special form, which we proceed to define.Put . ., a q } where 1 = a 1 < a 2 < . . .< a q .Thus q = ( 1 3 + o(1)) log n log log n .Let i 1 be the smallest integer t so that 2 t ≥ n.For 2 ≤ j ≤ q, let i j be the smallest integer t so that 2 t ≥ n a j log n .Therefore, n ≤ 2 i 1 < 2n and n a j log n ≤ 2 i j < 2n a j log n for all 2 ≤ j ≤ q.Since a j ≤ n 1/3 for all a j ∈ A ′ , it follows that i j > 1 2 log n for all admissible j.We say that n has a special representation as a partition with parts in A and multiplicities in M (for short: n has a special representation) if there is a representation of the form (1) where m j ∈ M a j ,i j for all 1 ≤ j ≤ q.Lemma 4.3 For all sufficiently large n, the probability that n does not have a special representation is at most e −Ω(log 5 n) .Therefore, for any ǫ > 0 there is an n 0 = n 0 (ǫ) such that the probability that there is a special representation for every integer n > n 0 is at least 1 − ǫ.
The assertion of Theorem 1.2 follows from Corollary 4.2 (with ǫ < 1/2) and Lemma 4.3 (with ǫ < 1/2) that supply the existence of an infinite set M satisfying the conclusions of the theorem.
In the proof of Lemma 4.3 we apply the Janson Inequality (c.f.[1], Chapter 8).We first state it to set the required notation.Let X be a finite set, and let R ⊂ X be a random subset of X obtained by picking each element r ∈ X to be a member of R, randomly and independently, with probability p r .Let C = {C i } i∈I be a collection of subsets of X, let B i denote the event that C i ⊂ R, and let i ∼ j denote the fact that i = j and C i ∩ C j = ∅.Let µ = i∈I P r[B i ] = i∈I j∈C i p j be the expected number of events B i that hold, and define ∆ = i,j∈I,i∼j P r[B i ∩ B j ] where the sum is computed over ordered pairs.The inequality we need is the following.
Lemma 4.4 (The Janson Inequality) In the notation above, if ∆ ≤ D with D ≥ µ then the probability that no event B i holds is at most e −µ 2 /2D .Note that the above statement is an immediate consequence of the two Janson inequalities described in [1], Chapter 8.If ∆ < µ than the above statement follows from the first inequality, whereas if ∆ ≥ µ then it follows from the second.
We can now prove Lemma 4.3.
Proof.We apply the Janson inequality as stated in Lemma 4.4 above.The set X here is a disjoint union of the sets X j = [2 i j ], 1 ≤ j ≤ q, and each element of X j is chosen with probability i 6 j 2 i j .The sets in the collection of sets C are all sequences of the form (m 1 , m 2 , . . ., m q ) with m j ∈ X j so that q j=1 m j a j = n. (2) Note that there are exactly q j=2 2 i j such sets, as for any choice of m j ∈ X j , 2 ≤ j ≤ q there is a unique choice of m 1 ∈ X 1 so that (2) holds.Therefore, in the notation above 1) , where the last equality follows from the fact that 1 2 log n ≤ i j ≤ log n for all 2 ≤ j ≤ q and the fact that q = ( 1 3 + o(1)) log n log log n .We proceed with the estimation of the quantity ∆ that appears in the inequality.This is the sum, over all ordered pairs of sequences m j ∈ X j , where m j a j = n and for at least one r, m r , of the probability that both m (1) j and m (2) j belong to M a j ,i j for all j.
Write ∆ = q ℓ=1 ∆ ℓ , where ∆ ℓ is the sum of these probabilities over all pairs m (1) j and m (2) j as above for which ℓ = min{j : m j }.
Claim 1: Indeed, for each choice of the sequence m j the contribution to ∆ 1 arises from sequences m j for which m r for all r is some nonempty subset I of {2, 3, . . ., q}.There are q j=2 2 i j choices for the sequence m j a j ).The probability that each m (1) j lies in M a j ,i j is i 6 j 2 i j .For each fixed choice of m (1) j and for each nonempty subset I as above, there are j>1,j ∈I (2 i j − 1) possibilities to choose the numbers m  1 is determined (and has to differ from m (1) j , which is another reason the above is an upper estimate for ∆ 1 and not a precise computation).The probability that m (2) j ∈ M a j ,i j for all these values of j is The final inequality above follows from the fact that i j > 0.5 log n for all j and that q = o(log n).
• The proof of Theorem 1.2 can be easily modified to work for any sequence A that grows to infinity at least as fast as k Ω(k) and satisfies gcd(A) = 1.
• Erdős and Turán [3] asked if for any asymptotic basis of order 2 of the positive integers (that is, a set A of positive integers so that each sufficiently large integer has a representation as a sum of two elements of A), there must be, for any constant t, integers that have more than t such representations.Theorem 1.1 shows that a natural analogous statement does not hold for partition functions with restricted multiplicities.
by the value of the sum q j=1 m

( 2 )
j , j > 1, j ∈ I, and the value of m