%I #32 Oct 31 2017 10:36:18
%S 3,5,7,12,19,39,71,152,315,685,1479,3294,7283,16359,36791,83312,
%T 189123,431393,986247,2262308,5200851,11985863,27676615,64034954,
%U 148406243,344507805,800902879,1864502926,4346071603,10142619039,23696518919,55420734752,129742923475,304014655205,712985901943,1673486556648
%N Number of n-bead necklaces labeled with numbers 1..3 not allowing reversal, with no adjacent beads differing by more than 1.
%C Allowing arbitrary differences between the first and last bead gives A215327. [_Joerg Arndt_, Aug 08 2012]
%H Vincenzo Librandi, <a href="/A208772/b208772.txt">Table of n, a(n) for n = 1..200</a>
%H Arnold Knopfmacher, Toufik Mansour, Augustine Munagi, Helmut Prodinger, <a href="http://arxiv.org/abs/0809.0551">Smooth words and Chebyshev polynomials</a>, arXiv:0809.0551v1 [math.CO], 2008.
%F a(n) = Sum_{ d | n } A215335(d). - _Joerg Arndt_, Aug 13 2012
%F a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124696(n). - _Andrew Howroyd_, Mar 18 2017
%e All solutions for n=4:
%e ..1....2....2....2....1....1....1....3....2....1....2....1
%e ..2....2....3....2....1....2....1....3....3....2....2....1
%e ..1....3....2....2....2....3....1....3....3....2....2....1
%e ..2....3....3....3....2....2....1....3....3....2....2....2
%t sn[n_, k_] := 1/n*Sum[ Sum[ EulerPhi[j]*(1 + 2*Cos[i*Pi/(k + 1)])^(n/j), {j, Divisors[n]}], {i, 1, k}]; Table[sn[n, 3], {n, 1, 36}] // FullSimplify (* _Jean-François Alcover_, Oct 31 2017, after _Joerg Arndt_ *)
%o (PARI)
%o /* from the Knopfmacher et al. reference */
%o default(realprecision,99); /* using floats */
%o sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
%o vector(66,n, round(sn(n,3)) )
%o /* _Joerg Arndt_, Aug 09 2012 */
%Y Column 3 of A208777.
%Y Cf. A215335 (cyclically smooth Lyndon words with 3 colors).
%K nonn
%O 1,1
%A _R. H. Hardin_, Mar 01 2012