in wikipedia, https://en.wikipedia.org/wiki/Primitive_root_modulo_n#Finding_primitive_roots,
it says there is no formula to compute primitive root mod n. and in the footnote 8, it seems that there are no fast algorithm neither.
but isn't that algorithm shown in this link fast enough? I mean, calculating modular exponentiation can be $O(\log n)$ fast, so this algorithm looks at most $O(n\log n)$. it's better than $O(n^2)$, so seems fast enough.
am I misunderstanding somewhere about time complexity analysis? or is it just not fast enough?