First time here? Check out the FAQ!
answered 2024-03-26 14:20:58 +0100
Perhaps, the easiest way is to use pari.ispower():
pari.ispower()
pari.ispower(Mod(n,q), b)