Creating a divisor-counting sieve for all numbers 1-n is well known
func sieve(n)
counts = array of size n+1, all elements set to 1, counts[0] = 0 arbitrary
for 2 <= i <= n
for i <= j <= n, stepwise i
counts[j]++;
return counts
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?
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
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