From the Gapcoin-PoWCore README
The average length of a prime gap with the starting prime , is , which means that the average prime gap size increases with larger primes. Instead of the pure length, Gapcoin uses the merit of a prime gap, which is the ratio of the gap’s size to the average gap size. Let be the prime starting a prime gap, then will be the merit of this prime gap.
Also a pseudo random number is calculated from to provide finer difficulty adjustment. Let be a pseudo-random function with . Then, for a prime gap starting at prime with size , the difficulty will be , where is the average distance between a gap of size and (the next greater gap) in the proximity of .
When it actually comes to mining, there are two additional fields added to the block header, named “shift” and “adder”. We will calculate the prime as sha256(block header) ∗ 2^shift + adder
. As an additional criterion, the adder must be smaller than 2^shift
to avoid the PoW being reused.
The average length of a prime gap with the starting prime , is , which means that the average prime gap size increases with larger primes. Instead of the pure length, Gapcoin uses the merit of a prime gap, which is the ratio of the gap’s size to the average gap size. Let be the prime starting a prime gap, then will be the merit of this prime gap.
Also a pseudo random number is calculated from to provide finer difficulty adjustment. Let be a pseudo-random function with . Then, for a prime gap starting at prime with size , the difficulty will be , where is the average distance between a gap of size and (the next greater gap) in the proximity of .
When it actually comes to mining, there are two additional fields added to the block header, named “shift” and “adder”. We will calculate the prime as sha256(block header) ∗ 2^shift + adder
. As an additional criterion, the adder must be smaller than 2^shift
to avoid the PoW being reused.