cp's OEIS Frontend

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.

A215337 Cyclically smooth Lyndon words with 5 colors.

This page as a plain text file.
%I A215337 #11 Jul 22 2018 10:44:39
%S A215337 5,4,8,15,36,74,180,411,996,2400,5940,14707,36972,93276,237264,606030,
%T A215337 1556028,4009118,10367892,26888925,69930264,182296212,476262756,
%U A215337 1246695079,3269321352,8587452204,22590645408,59510993607,156973954860,414552239458,1096017973380,2900753084400,7684758670248,20377460964156,54081265456116
%N A215337 Cyclically smooth Lyndon words with 5 colors.
%C A215337 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 A215337 Vincenzo Librandi, <a href="/A215337/b215337.txt">Table of n, a(n) for n = 1..200</a>
%H A215337 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 A215337 a(n) = sum_{ d divides n } moebius(n/d) * A208774(d).
%e A215337 The cyclically smooth necklaces (N) and Lyndon words (L) of length 4 with 5 colors (using symbols ".", "1", "2", "3", and "4") are:
%e A215337     ....   1       .  N
%e A215337     ...1   4    ...1  N L
%e A215337     ..11   4    ..11  N L
%e A215337     .1.1   2      .1  N
%e A215337     .111   4    .111  N L
%e A215337     .121   4    .121  N L
%e A215337     1111   1       1  N
%e A215337     1112   4    1112  N L
%e A215337     1122   4    1122  N L
%e A215337     1212   2      12  N
%e A215337     1222   4    1222  N L
%e A215337     1232   4    1232  N L
%e A215337     2222   1       2  N
%e A215337     2223   4    2223  N L
%e A215337     2233   4    2233  N L
%e A215337     2323   2      23  N
%e A215337     2333   4    2333  N L
%e A215337     2343   4    2343  N L
%e A215337     3333   1       3  N
%e A215337     3334   4    3334  N L
%e A215337     3344   4    3344  N L
%e A215337     3434   2      34  N
%e A215337     3444   4    3444  N L
%e A215337     4444   1       4  N
%e A215337 There are 24 necklaces (so A208774(4)=24) and a(4)=15 Lyndon words.
%t A215337 terms = 40;
%t A215337 sn[n_, k_] := 1/n Sum[EulerPhi[j] (1+2Cos[i Pi/(k+1)])^(n/j), {i, 1, k}, {j, Divisors[n]}];
%t A215337 vn = Table[Round[sn[n, 5]], {n, terms}];
%t A215337 vl = Table[Sum[MoebiusMu[n/d] vn[[d]], {d, Divisors[n]}], {n, terms}] (* _Jean-François Alcover_, Jul 22 2018, after _Joerg Arndt_ *)
%o A215337 (PARI)
%o A215337 default(realprecision,99); /* using floats */
%o A215337 sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
%o A215337 vn=vector(66,n, round(sn(n,5)) ); /* necklaces */
%o A215337 /* Lyndon words, via Moebius inversion: */
%o A215337 vl=vector(#vn,n, sumdiv(n,d, moebius(n/d)*vn[d]))
%K A215337 nonn
%O A215337 1,1
%A A215337 _Joerg Arndt_, Aug 13 2012