Due to this equality, if a curve with a certain j-invariant is not anomalous, we check if the group order is p + 2. If this is the case, then we compute a quadratic twist of the curve (with sufficiently small coefficients, for convenience) and the resulting curve will be anomalous.