code: func qp(p uint, g Pol) Pol {
  	num := (1 << p)
  	i := 1
  
  	// start with x
  	res := Pol(2)
  
  	for i < num {
  		// repeatedly square res
  		res = res.MulMod(res, g)
  		i *= 2
  	}
  
  	// add x
  	return res.Add(2).Mod(g)
  }
docs: // qp computes the polynomial (x^(2^p)-x) mod g. This is needed for the
  // reducibility test.