Sometimes called "squarefree de Bruijn sequences" Two such sequences are distinct if they are not cyclic permutations of each other. Open: do any such ternary sequences exist for n>4 ?
a(2) = 3 because the following 3 sequences contain each length-2 substring {01,02,10,12,20,21} while avoiding any square {00,11,22} and are all distinct from each other: