Gapplet
Given a prime number p, we compute a primitive element g and the corresponding detection pattern.