Count Prime-Gap Balanced Subarrays
Grow each subarray from a fixed start and track its smallest and largest prime, counting it when it has two primes within k.
Grow each subarray from a fixed start and track its smallest and largest prime, counting it when it has two primes within k.