The average of two computations of the Legendre symbol are explained as follows : y is a quadratic residue with chance \ tfrac { \ tfrac { p + 1 } { 2 } } { p } = \ tfrac { 1 + \ tfrac { 1 } { p } } { 2 }, which is smaller than 1 but \ geq \ tfrac { 1 } { 2 }, so we will on average need to check if a y is a quadratic residue two times.