Total number of comparisons to find each of the values 1 through n using a binary search with 3-way comparisons (less than, equal and greater than), always choosing the mid-most value to compare to.
A097384
Total number of comparisons to find each of the values 1 through n using a binary search with 3-way comparisons (less than, equal and greater than), always choosing the mid-most value to compare to.
Terms
- a(0) =0a(1) =2a(2) =3a(3) =6a(4) =9a(5) =11a(6) =13a(7) =17a(8) =21a(9) =25a(10) =29a(11) =32a(12) =35a(13) =38a(14) =41a(15) =46a(16) =51a(17) =56a(18) =61a(19) =66a(20) =71a(21) =76a(22) =81a(23) =85a(24) =89a(25) =93a(26) =97a(27) =101a(28) =105a(29) =109
External references
- oeis: A097384