Bitcoin and the double-spending problem (2013)
blogs.cornell.edu
blogs.cornell.edu
Botnets are irrelevant to Bitcoin mining these days. The datacenters full of ASICs that miners are using now can easily outmine any botnet made of ordinary PCs or servers no matter how large.
I see this article is close to 2 years old. A lot has changed since then.
Bruteforcing a sha prefix has nothing to do with prime numbers. In the case of bitcoin mining, an arbitrary nonce is included in a block. Different values of this nonce are tested in order to get a resulting hash with the required number of leading zeros.