Start with the product

$$(1+x+x^2) (1+x^2)(1+x^3)(1+x^4)\cdots$$

(The first polynomial is a trinomial..The others are binomials..) Is it possible by changing some of the signs to get a series all of whose coefficients are $ -1,0,$or $1$?

A simple computer search should suffice to answer the question if the answer is "no." I haven't yet done such a search myself.

This question is a takeoff on the well known partition identities like:

$$\prod_{n=1}^{\infty} (1-x^n)= 1-x-x^2+x^5+x^7-\ldots$$

  • $\begingroup$ What for? Where could that be applied? $\endgroup$
    – user64494
    Jun 8, 2019 at 16:40
  • $\begingroup$ The dots at the end lead me to think that the product goes on with an arbitrary number of terms, say $n$. But then you mention a "series", which is infinite; I interpret "coefficient" as the coefficient $a_i$ of a power series, $\sum a_i x^i$. However, adding a term to the product, i.e. taking $n+1$, changes all the coefficients $a_i$. Can you please clarify? Also, the last sentence is unclear. Have you already performed the "computer search"? If so, what was the result? Or you are suggesting a method to the other members to answer your question? $\endgroup$ Jun 8, 2019 at 17:25
  • $\begingroup$ @DorianoBrogioli The given product $(1+x+x^2)\prod_{n=2}^\infty(1+x^n)$ converges in the power series ring $\mathbb Z[[x]]$, as does the product if one replaces any subset of the plus signs with minus signs. And since the $(1+x^n)$ terms with $n\ge N$ only affect the series coefficients starting with $x^N$, one could check all signs for, say, $N=4$, and if they fail to have $-1,0,1$ coefficients in one of their $x^i$ coefficients with $i\le3$, then the answer is "No". I think that's what the OP means by "a simple computer search." $\endgroup$ Jun 8, 2019 at 17:36
  • 1
    $\begingroup$ @DorianoBrogioli Nice, but $(1-x-x^2)\prod_{n=2}^8 (1+x^n)=1 - x - x^4 - x^6 - x^7 - 2*x^8+O(x^9)$, so the $x^8$ term fails if you just change $1+x+x^2$ to $1-x-x^2$. In any case, you've shown that one needs to at least check up to $N=8$, which is quite a few possible sign choices, although certainly feasible. $\endgroup$ Jun 8, 2019 at 18:53
  • 16
    $\begingroup$ @user64494 "What for? Where could that be applied?" What's the point of asking this question, especially in this particular form, all over the site? If you don't like the post or it is not interesting to you, just ignore it. The problem is well-posed and the answer is not immediately obvious. What else do you want from a mathematical question? Somebody is interested in it for some reason and he has no more obligation to explain to you why than you have to explain to him what the meaning and the purpose of your life are. Just live and let live :-) $\endgroup$
    – fedja
    Jun 9, 2019 at 1:11

3 Answers 3


Proof of Doriano Brogloli's answer:

Call $a(n)$ the $n$th coefficient of $A(x)=(1-x)(1-x^2)\cdots$. By Euler's pentagonal theorem we have $a(n)=0$ unless $n=m(3m\pm1)/2$ for some $m$, in which case $a(m)=(-1)^m$. Call $b(n)$ the $n$th coefficient of $B(x)=(1-x^2)(1-x^3)...$. Since $A(x)=(1-x)B(x)$ we have $b(n)-b(n-1)=a(n)$, so $b(n)=\sum_{0\le j\le n}a(j)$. Now for any integer $n$ there exists a unique $m$ such that $(m-1)(3(m-1)+1)/2\le n<m(3m+1)/2$. If $(m-1)(3m-2)/2\le n<m(3m-1)/2$ we thus have $b(n)=1+2\sum_{1\le j\le m-1}(-1)^j=(-1)^{m-1}$, and if $m(3m-1)/2\le n<m(3m+1)/2$ we have $b(n)=(-1)^{m-1}+(-1)^m=0$.

Finally, we have $C(x)=(1-x+x^2)(1-x)(1-x^2)\cdots=A(x)+x^2B(x)$ so its $N+2$th coefficient $c(N+2)$ is equal to $a(N+2)+b(N)$. Thus, if $(m-1)(3m-2)/2\le N<m(3m-1)/2$ but $N\ne m(3m-1)/2-2$ we have $c(N+2)=(-1)^{m-1}$, while if $N=m(3m-1)/2-2$ we have $c(N+2)=(-1)^{m-1}+(-1)^m=0$, and if $m(3m-1)/2\le N<m(3m+1)/2$ but $N\ne m(3m+1)/2-2$ we have $c(N+2)=0$, while if $N=m(3m+1)/2-2$ we have $c(N+2)=(-1)^m$.


Possible answers: $$ \left(1+x+x^2\right) \prod_{i=2}^{+\infty} \left(1 - (-1)^i x^i \right) $$ and $$ \left(1-x+x^2\right) \prod_{i=2}^{+\infty} \left(1 - x^i \right) $$

  • $\begingroup$ This is correct up to 1000; I've checked it, Now it only remains to prove it. $\endgroup$ Jun 8, 2019 at 21:36
  • $\begingroup$ indeed, apologies for my mistaken answer and for the confusion it created. $\endgroup$ Jun 8, 2019 at 21:37
  • 13
    $\begingroup$ Nice and easily proven from Euler's pentagonal number theorem: call $c(N)$ the $N$th coefficient, Then if $(m-1)(3m-2)/2\le N-2<m(3m-1)/2$ we have $c(N)=(-1)^{m-1}$ except if $N-2=m(3m-1)/2-2$ in which case it is $0$, and if $m(3m-1)/2\le N-2<m(3m+1)/2$ it is $0$ except if $N-2=m(3m+1)/2-2$ in which case it is $(-1)^m$. $\endgroup$ Jun 8, 2019 at 21:57
  • 2
    $\begingroup$ @HenriCohen Could you post that as an answer, then it can be accepted? $\endgroup$ Jun 8, 2019 at 22:07
  • $\begingroup$ Henri Cohen gives us two solutions . I believe it's still undecided if there are other solutions. $\endgroup$ Jun 8, 2019 at 23:37

I made a mistake in my initial answer, apologies, I tested for all coefficients instead of stopping at the first $n_{\rm max}$ and thought I found a violation at $n_{\rm max}=9$. With the corrected code I find a solution for each $n_{\rm max}$ I could check.

This Mathematica codes tests if the coefficients of $x^p$ with $p\leq n_{\rm max}$ of the polynomial $$(1+\sigma_1 x+\sigma_2 x^2)\prod_{n=2}^{n_{\rm max}}(1+\sigma_{n+1}x^n)$$ are in $\{-1,0,1\}$. The test is performed for each of the $2^{n_{\rm max}+1}$ choices of signs $\sigma_i=\pm 1$.

nmax = 9; 
s = Tuples[{-1, 1}, nmax + 1];  
list = Table[CoefficientList[(1 + s[[i, 1]]*x + s[[i, 2]]*x^2)*
             Product[(1 + s[[i, n + 1]]*x^n), {n, 2, nmax}], x],
                                               {i, 1, 2^(nmax + 1)}]; 
Table[AllTrue[list[[i, 1;;nmax]], Abs[#] < 2 &], {i, 1, 2^(nmax + 1)}] // Sort

  • $\begingroup$ Thanks. I was going to write a PARI program when I got a chance, but you beat me to it. Seems that in general one can get the coefficients quite small, so the function giving the minimum over signs of the maximum coefficient, as a function of $n_{\max}$, seems as if it might be an interesting sequence. Any chance you want to modify your code to list that sequence up to whatever value of $n_{\max}$ can be computed in a reasonable amount of time. If it's long enough, would be interesting to see if it matches anything on the OEIS. $\endgroup$ Jun 8, 2019 at 20:35
  • $\begingroup$ @Carlo Beenakker I'm going to have to check my computations. I found 40 coefficients which fit the conditions and no hint that this is all the end. I'll try reading the Mathematica code. $\endgroup$ Jun 8, 2019 at 20:46
  • 1
    $\begingroup$ If you have time, please check the answer I gave below. $\endgroup$ Jun 8, 2019 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.