%I #38 Aug 18 2024 19:02:39
%S 1,3,6,6,12,0,18,0,24,0,0,66,72,78,0,30,48,0,252,228,300,42,462,690,
%T 720,750,702,810,1260,2088,3870,5022,5568,4752,5916,10920,16416,18870,
%U 21660,23556,34320,51414,75852,93654,108372,126360,172914,245058,343872
%N Number of ternary squarefree necklaces.
%C A square is an adjacent pair of repeats, e.g., "aa" or "abcabc". A necklace is a word that may be rotated before being tested (for squares).
%C Several similar sequences (with same zeros) can be constructed from equivalence classes of the loops.
%C Higher terms: a(n) > 0 for 30 < n <= 56; no zeros known after a(17).
%C This is also the number of ternary "circular" squarefree words. The Currie paper proves no 0 entries after a(17). - _Jeffrey Shallit_, Jul 11 2012
%H J. D. Currie, <a href="https://doi.org/10.37236/1671">There are ternary circular square-free words of length n for n >= 18</a>, Elect. J. Combinatorics 9 (2002), Paper N10.
%e a(1)=3, size of {"a","b","c"}; a(6)=18, size of {"abacbc","bacbca",...,"cbabca"}.
%Y Variant of A006156. See also A001037, A006206.
%K hard,nice,nonn
%O 0,2
%A Paul Parsons (paul.parsons6(AT)btinternet.com)
%E a(31)-a(36) from _Jeffrey Shallit_, Jan 22 2019
%E a(37)-a(48) from _Sean A. Irvine_, Oct 07 2023