The jacobi command computes the Jacobi symbol (a | n) where a and n are non-negative integers. When n is prime, the Jacobi symbol indicates whether a is a quadratic residue modulo n.
jacobi(2,5); -1 jacobi(4,5); 1