title: Using Python to Find Integer Solutions to System of Linear Equations
body: <p>I am trying to write a python program to solve for all the positive integer solutions of a polynomial of the form <code>x_1 + 2x_2 + ... + Tx_T = a</code> subject to <code>x_0 + x_1 + ... + x_T = b</code>. </p>
  
  <p>For example, by brute-force I can show that the only positive integer solution to <code>x_1 + 2x_2 = 4</code> subject to <code>x_0 + x_1 + x_2 = 2</code> is <code>(0,0,2)</code>. However, I would like a program to do this on its own.</p>
  
  <p>Any suggestions?</p>