Please does somebody know of an online list or tool (if possible server side, not a Java applet running in my computer) to calculate the primitive roots modulo n, for instance $n \in [1,1000]$ (apart from the Wikipedia list)?
I know this site (link) which is very good, but it just calculates the primivite roots modulo a prime number, and I would like to check it for other values (if I am not wrong $n = 4, p^k$ and $2p^k$ where p is an odd prime would also have primitive roots modulo n).
I have been searching in the old questions, but I did not find it. If this was already asked I will remove the question. Thank you!
Thank you very much for the code in the answers! I have made also my own Python code, but I would like to know if there is an online list or tool, it could be helpful for somebody else. Here is my (very brute force) version:
from sympy import is_primitive_root def prim_root_prod(value): prlist =  for i in range (1,value): if is_primitive_root(i,value): prlist.append(i) return prlist