3Thanks
• 1 Post By Sylvia104
• 2 Post By Deveno

# Thread:

1. ## generator of Z*p

if p,q are primes with p=2q+1, and we pick a random number g in Z*p, what is the probability that g is a generator of Z*p?

2. ## Re: Generator of Z*p

$\mathbb Z_p^\times$ is cyclic of order $p-1=2q$ and so has $\varphi(2q)$ generators. The probability of picking a generator is thus

$\frac{\varphi(2q)}{2q}\ =\ \left\{ \begin{array} {cl} \dfrac12 & \text{if}\ q=2 \\\\ \dfrac{q-1}{2q} & \text{if}\ q>2 \end{array} \right.$

3. ## Re: generator of Z*p

note that if q is very large this is "nearly" 1/2 (even for the relatively small q = 3 it's already 1/3 (approx. 33%) and for q = 5 it's jumped to 2/5 (40%)). these odds are good enough that it often suffices to check 2,3,5 and 7 as possible generators for small values of p (i think 109 is the first prime where you have to use something else, and 6 works there, 191 is the smallest prime that has a relatively "large" smallest primitive element (19)...note that both of these are not of the form considered here since neither 54 nor 95 is prime).

this is good news, since it's not always easy to tell if a given number *is* a generator. as far as i know, trial-and-error is still the best method.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 4, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9518063068389893, "perplexity_flag": "middle"}