Minimum 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).

A097383

Minimum 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).

Terms

    a(0) =0a(1) =2a(2) =3a(3) =6a(4) =8a(5) =11a(6) =13a(7) =17a(8) =20a(9) =24a(10) =27a(11) =31a(12) =34a(13) =38a(14) =41a(15) =46a(16) =50a(17) =55a(18) =59a(19) =64a(20) =68a(21) =73a(22) =77a(23) =82a(24) =86a(25) =91a(26) =95a(27) =100a(28) =104a(29) =109

External references