This is very likely wrong, but my gut says to divide the stack into 4 piles of 4. Test each batch, and then further subdivide batches that come out as positive by 2 and then finally individually. I could very well be wrong about this, but the efficiency would depend on the value of K. As K increases, all solutions would approach the worst-case scenario. Actually my system would be much more inefficient than doing 16 individual tests if all coins were counterfeit. Interesting puzzle. Do you know the answer, or are you just trying to solve the dilemma?