First time here? Check out the FAQ!
answered 1 year ago
Perhaps, the easiest way is to use pari.ispower():
pari.ispower()
pari.ispower(Mod(n,q), b)