title: How to divisor sieve numbers of form kn^p?
body: <p>Creating a divisor-counting sieve for all numbers 1-n is well known</p>
  
  <pre><code>func sieve(n)
      counts = array of size n+1, all elements set to 1, counts[0] = 0 arbitrary
  
      for 2 &lt;= i &lt;= n
          for i &lt;= j &lt;= n, stepwise i
              counts[j]++;
      return counts
  </code></pre>
  
  <p>However what if, instead of creating a sieve for numbers of form 1 * n, I wanted the divisor counts for numbers of form 6n^2 instead? </p>
  
  <p>So instead of finding the divisor counts for
  1, 2, 3, 4, 5, etc
  It might be instead looking for divisor counts of
  6, 24, 54, 96, 150, etc</p>
  
  <p>But really just numbers of form kn^p, in an efficient way so I am not actually storing an array of size kn^p at its largest. Seems like I should only need array of size N as before, only each spot represents the number of divisors of kn^p</p>