title: Check List for an Abstract Quality in Mathematica
body: <p>I'm working with a list in Mathematica generated by the <code>FactorList</code> function that looks like</p>
  
  <pre><code>t = {{-1, 1}, {q, 1}, {P[41, 42], 1}, {P[41, 43], 1}, {P[42, 43], 1}}
  </code></pre>
  
  <p>I would like to search through this list, identify which elements in position <code>[i][1]</code> (where i is the position of the ith set in t) are of the form <code>P[a,b]</code> where a,b are integers. </p>
  
  <p>Is there a way to test if an element conforms to the general form <code>P[integer, integer]</code> so that running this test on the value <code>q</code>, element t[[2][1]], would return <code>False</code> and running it on <code>P[41,43]</code> would return <code>True</code>? </p>