Ternary sequences have superior merit factors but they cannot be transmitted with existing technology. It is proposed that a ternary sequence be coded into a binary sequence for the purpose of transmission. On reception it can be processed as a binary sequence as received and also decoded into a ternary sequence. These two interpretations provide a coincidence detection scheme for efficient target detection provided that the corresponding signal design problem is solved. Such an algorithm is developed by taking the merit factor as desideratum and the Hamming scan as optimization technique. Merit factor values obtained in some cases are further improved by implementing a back-tracking algorithm for bi-alphabetic sequence.