How do I find maximum and minimum number of times the search loop will execute when searching through an array of 1,048,576 integers
I assume your input is random and your array of size $N$, $A[1..N]$.

In case of binary search if the number you are searching for is located at $(1+N)/2$, i.e. right in the middle of the input array then you will find it after the first if-statement.

Similarly in case of sequential search, if number your are searching for is the first element of the array then you stop after the first if-statement.

In both cases you do only one comparison.