title: Sum of powers of prime factors
body: <p>Given an array of integers (each &lt;=10^6) what is the fastest way to find the sum of powers of prime factors of  each integer?</p>
  
  <pre><code>Ex:- 
      array: 4 6 12 7
      4 -&gt; 2^2 -&gt; 2
      6 -&gt; 2^1 * 3^1 -&gt; 1+1 -&gt; 2
      12 -&gt; 2^2 * 3^1 -&gt; 2+1 -&gt; 3
      7 -&gt; 7^1 -&gt; 1
      Answer: 2+2+3+1 = 8
  </code></pre>