Primality Testing for Numbers of the Form h · 2n ± 1