This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A215335 #21 Jul 22 2018 10:43:26 %S A215335 3,2,4,7,16,30,68,140,308,664,1476,3248,7280,16286,36768,83160,189120, %T A215335 431046,986244,2261616,5200776,11984382,27676612,64031520,148406224, %U A215335 344500520,800902564,1864486560,4346071600,10142581552,23696518916,55420651440,129742921992,304014466080,712985901856,1673486122000 %N A215335 Cyclically smooth Lyndon words with 3 colors. %C A215335 We call a Lyndon word (x[1],x[2],...,x[n]) smooth if abs(x[k]-x[k-1]) <= 1 for 2<=k<=n, and cyclically smooth if abs(x[1]-x[n]) <= 1. %H A215335 Vincenzo Librandi, <a href="/A215335/b215335.txt">Table of n, a(n) for n = 1..200</a> %H A215335 Latham Boyle, Paul J. Steinhardt, <a href="https://arxiv.org/abs/1608.08220">Self-Similar One-Dimensional Quasilattices</a>, arXiv preprint arXiv:1608.08220 [math-ph], 2016. %H A215335 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 A215335 a(n) = sum_{ d divides n } moebius(n/d) * A208772(d). %e A215335 The cyclically smooth necklaces (N) and Lyndon words (L) of length 4 with 3 colors (using symbols ".", "1", and "2") are: %e A215335 .... 1 . N %e A215335 ...1 4 ...1 N L %e A215335 ..11 4 ..11 N L %e A215335 .1.1 2 .1 N %e A215335 .111 4 .111 N L %e A215335 .121 4 .121 N L %e A215335 1111 1 1 N %e A215335 1112 4 1112 N L %e A215335 1122 4 1122 N L %e A215335 1212 2 12 N %e A215335 1222 4 1222 N L %e A215335 2222 1 2 N %e A215335 There are 12 necklaces (so A208772(4)=12) and a(4)=7 Lyndon words. %t A215335 terms = 40; %t A215335 sn[n_, k_] := 1/n Sum[EulerPhi[j] (1+2Cos[i Pi/(k+1)])^(n/j), {i, 1, k}, {j, Divisors[n]}]; %t A215335 vn = Table[Round[sn[n, 3]], {n, terms}]; %t A215335 vl = Table[Sum[MoebiusMu[n/d] vn[[d]], {d, Divisors[n]}], {n, terms}] (* _Jean-François Alcover_, Jul 22 2018, after _Joerg Arndt_ *) %o A215335 (PARI) %o A215335 default(realprecision,99); /* using floats */ %o A215335 sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j))); %o A215335 vn=vector(66,n, round(sn(n,3)) ); /* necklaces */ %o A215335 /* Lyndon words, via Moebius inversion: */ %o A215335 vl=vector(#vn,n, sumdiv(n,d, moebius(n/d)*vn[d])) %Y A215335 Cf. A208772 (cyclically smooth necklaces, 3 colors). %Y A215335 Cf. A215327 (smooth necklaces, 3 colors), A215328 (smooth Lyndon words, 3 colors). %K A215335 nonn %O A215335 1,1 %A A215335 _Joerg Arndt_, Aug 13 2012