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.

Showing 1-5 of 5 results.

A215327 Smooth necklaces with 3 colors.

Original entry on oeis.org

1, 3, 5, 8, 15, 27, 58, 115, 252, 541, 1196, 2629, 5894, 13156, 29667, 66978, 151966, 345497, 788396, 1802678, 4133161, 9495317, 21861393, 50423468, 116514553, 269666605, 625108573, 1451128479, 3373267275, 7851415838, 18296568717
Offset: 0

Views

Author

Joerg Arndt, Aug 08 2012

Keywords

Comments

We call a necklace (x[1],x[2],...,x[n]) smooth if abs(x[k]-x[k-1]) <= 1 for 2<=k<=n.
All binary necklaces (2 colors, A000031) are necessarily smooth.

Examples

			The smooth pre-necklaces, necklaces (N), and Lyndon words (L) of length 4 with 3 colors (using symbols ".", "1", and "2") are:
    ....   1       .  N
    ...1   4    ...1  N L
    ..1.   3     .1.
    ..11   4    ..11  N L
    ..12   4    ..12  N L
    .1.1   2      .1  N
    .11.   3     11.
    .111   4    .111  N L
    .112   4    .112  N L
    .121   4    .121  N L
    .122   4    .122  N L
    1111   1       1  N
    1112   4    1112  N L
    1121   3     121
    1122   4    1122  N L
    1212   2      12  N
    1221   3     221
    1222   4    1222  N L
    2222   1       2  N
There are 19 pre-necklaces, 15 necklaces, and 10 Lyndon words.
So a(4) = 15.
		

Crossrefs

Cf. A001867 (necklaces, 3 colors), A215328 (smooth Lyndon words, 3 colors).

Extensions

More terms from Joerg Arndt, Jun 17 2019

A215335 Cyclically smooth Lyndon words with 3 colors.

Original entry on oeis.org

3, 2, 4, 7, 16, 30, 68, 140, 308, 664, 1476, 3248, 7280, 16286, 36768, 83160, 189120, 431046, 986244, 2261616, 5200776, 11984382, 27676612, 64031520, 148406224, 344500520, 800902564, 1864486560, 4346071600, 10142581552, 23696518916, 55420651440, 129742921992, 304014466080, 712985901856, 1673486122000
Offset: 1

Views

Author

Joerg Arndt, Aug 13 2012

Keywords

Comments

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.

Examples

			The cyclically smooth necklaces (N) and Lyndon words (L) of length 4 with 3 colors (using symbols ".", "1", and "2") are:
    ....   1       .  N
    ...1   4    ...1  N L
    ..11   4    ..11  N L
    .1.1   2      .1  N
    .111   4    .111  N L
    .121   4    .121  N L
    1111   1       1  N
    1112   4    1112  N L
    1122   4    1122  N L
    1212   2      12  N
    1222   4    1222  N L
    2222   1       2  N
There are 12 necklaces (so A208772(4)=12) and a(4)=7 Lyndon words.
		

Crossrefs

Cf. A208772 (cyclically smooth necklaces, 3 colors).
Cf. A215327 (smooth necklaces, 3 colors), A215328 (smooth Lyndon words, 3 colors).

Programs

  • Mathematica
    terms = 40;
    sn[n_, k_] := 1/n Sum[EulerPhi[j] (1+2Cos[i Pi/(k+1)])^(n/j), {i, 1, k}, {j, Divisors[n]}];
    vn = Table[Round[sn[n, 3]], {n, terms}];
    vl = Table[Sum[MoebiusMu[n/d] vn[[d]], {d, Divisors[n]}], {n, terms}] (* Jean-François Alcover, Jul 22 2018, after Joerg Arndt *)
  • PARI
    default(realprecision,99); /* using floats */
    sn(n,k)=1/n*sum(i=1,k,sumdiv(n,j,eulerphi(j)*(1+2*cos(i*Pi/(k+1)))^(n/j)));
    vn=vector(66,n, round(sn(n,3)) ); /* necklaces */
    /* Lyndon words, via Moebius inversion: */
    vl=vector(#vn,n, sumdiv(n,d, moebius(n/d)*vn[d]))

Formula

a(n) = sum_{ d divides n } moebius(n/d) * A208772(d).

A215330 Smooth Lyndon words with 4 colors.

Original entry on oeis.org

1, 4, 3, 8, 18, 47, 108, 268, 638, 1553, 3761, 9189, 22453, 55185, 135894, 335906, 832312, 2068066, 5149845, 12852750, 32138353, 80509495, 202013368, 507669048, 1277586867, 3219366610, 8122275225
Offset: 0

Views

Author

Joerg Arndt, Aug 08 2012

Keywords

Comments

We call a Lyndon word (x[1],x[2],...,x[n]) smooth if abs(x[k]-x[k-1]) <= 1 for 2<=k<=n.

Examples

			(See A215329).
		

Crossrefs

Cf. A215329 (smooth necklaces, 4 colors), A215328 (smooth Lyndon words, 3 colors).

Extensions

More terms from Joerg Arndt, Jun 17 2019

A215331 Smooth necklaces with 5 colors.

Original entry on oeis.org

1, 5, 9, 16, 35, 76, 190, 455, 1156, 2911, 7438, 18992, 48902, 125968, 325975, 845202, 2197690, 5725854, 14951308, 39110371, 102490649, 269002564, 707096093, 1861183847, 4905172383, 12942843424
Offset: 0

Views

Author

Joerg Arndt, Aug 08 2012

Keywords

Comments

We call a necklace (x[1],x[2],...,x[n]) smooth if abs(x[k]-x[k-1]) <= 1 for 2<=k<=n.

Examples

			The smooth pre-necklaces, necklaces (N), and Lyndon words (L) of length 4 with 4 colors (using symbols ".", "1", "2", "3", and "4") are:
    ....   1       .  N
    ...1   4    ...1  N L
    ..1.   3     .1.
    ..11   4    ..11  N L
    ..12   4    ..12  N L
    .1.1   2      .1  N
    .11.   3     11.
    .111   4    .111  N L
    .112   4    .112  N L
    .121   4    .121  N L
    .122   4    .122  N L
    .123   4    .123  N L
    1111   1       1  N
    1112   4    1112  N L
    1121   3     121
    1122   4    1122  N L
    1123   4    1123  N L
    1212   2      12  N
    1221   3     221
    1222   4    1222  N L
    1223   4    1223  N L
    1232   4    1232  N L
    1233   4    1233  N L
    1234   4    1234  N L
    2222   1       2  N
    2223   4    2223  N L
    2232   3     232
    2233   4    2233  N L
    2234   4    2234  N L
    2323   2      23  N
    2332   3     332
    2333   4    2333  N L
    2334   4    2334  N L
    2343   4    2343  N L
    2344   4    2344  N L
    3333   1       3  N
    3334   4    3334  N L
    3343   3     343
    3344   4    3344  N L
    3434   2      34  N
    3443   3     443
    3444   4    3444  N L
    4444   1       4  N
There are 43 pre-necklaces, 35 necklaces, and 26 Lyndon words.
So a(4) = 35.
		

Crossrefs

Cf. A215327 (smooth necklaces, 3 colors) A215328 (smooth Lyndon words, 3 colors).

Extensions

More terms from Joerg Arndt, Jun 17 2019

A215334 Smooth Lyndon words with 7 colors.

Original entry on oeis.org

1, 7, 6, 17, 42, 119, 305, 829, 2196, 5907, 15863, 42842, 115845, 314368, 854647, 2329087, 6358855, 17393327, 47652117, 130752969, 359270784, 988458115, 2722792878
Offset: 0

Views

Author

Joerg Arndt, Aug 08 2012

Keywords

Comments

We call a Lyndon word (x[1],x[2],...,x[n]) smooth if abs(x[k]-x[k-1]) <= 1 for 2<=k<=n.

Examples

			(See A215333).
		

Crossrefs

Cf. A215328 (smooth Lyndon words, 3 colors), A215327 (smooth necklaces, 3 colors).

Extensions

More terms from Joerg Arndt, Jun 17 2019
Showing 1-5 of 5 results.