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-8 of 8 results.

A215328 Smooth Lyndon words with 3 colors.

Original entry on oeis.org

1, 3, 2, 5, 10, 24, 49, 112, 240, 534, 1175, 2626, 5848, 13153, 29594, 66955, 151814, 345494, 788049, 1802675, 4132469, 9495242, 21859912, 50423465, 116511119, 269666586, 625101288, 1451128164, 3373250909, 7851415835
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.
All binary Lyndon words (2 colors, A001037) are necessarily smooth.

Examples

			(See A215327).
		

Crossrefs

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

Extensions

More terms from Joerg Arndt, Jun 17 2019

A208772 Number of n-bead necklaces labeled with numbers 1..3 not allowing reversal, with no adjacent beads differing by more than 1.

Original entry on oeis.org

3, 5, 7, 12, 19, 39, 71, 152, 315, 685, 1479, 3294, 7283, 16359, 36791, 83312, 189123, 431393, 986247, 2262308, 5200851, 11985863, 27676615, 64034954, 148406243, 344507805, 800902879, 1864502926, 4346071603, 10142619039, 23696518919, 55420734752, 129742923475, 304014655205, 712985901943, 1673486556648
Offset: 1

Views

Author

R. H. Hardin, Mar 01 2012

Keywords

Comments

Allowing arbitrary differences between the first and last bead gives A215327. [Joerg Arndt, Aug 08 2012]

Examples

			All solutions for n=4:
..1....2....2....2....1....1....1....3....2....1....2....1
..2....2....3....2....1....2....1....3....3....2....2....1
..1....3....2....2....2....3....1....3....3....2....2....1
..2....3....3....3....2....2....1....3....3....2....2....2
		

Crossrefs

Column 3 of A208777.
Cf. A215335 (cyclically smooth Lyndon words with 3 colors).

Programs

  • Mathematica
    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 *)
  • PARI
    /* from the Knopfmacher et al. reference */
    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)));
    vector(66,n, round(sn(n,3)) )
    /* Joerg Arndt, Aug 09 2012 */

Formula

a(n) = Sum_{ d | n } A215335(d). - Joerg Arndt, Aug 13 2012
a(n) = (1/n) * Sum_{d | n} totient(n/d) * A124696(n). - Andrew Howroyd, Mar 18 2017

A215329 Smooth necklaces with 4 colors.

Original entry on oeis.org

1, 4, 7, 12, 25, 51, 121, 272, 656, 1563, 3794, 9193, 22529, 55189, 136025, 335942, 832605, 2068070, 5150558, 12852754, 32139908, 80509629, 202016993, 507669052, 1277595853, 3219366640, 8122296152
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", and "3") 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
    2222   1       2  N
    2223   4    2223  N L
    2232   3     232
    2233   4    2233  N L
    2323   2      23  N
    2332   3     332
    2333   4    2333  N L
    3333   1       3  N
There are 31 pre-necklaces, 25 necklaces, and 18 Lyndon words.
So a(4) = 25.
		

Crossrefs

Cf. A215327 (smooth necklaces, 3 colors)

Extensions

More terms from Joerg Arndt, Jun 17 2019

A215333 Smooth necklaces with 7 colors.

Original entry on oeis.org

1, 7, 13, 24, 55, 126, 330, 836, 2232, 5926, 15932, 42849, 116011, 314375, 854952, 2329162, 6359574, 17393334, 47653952, 130752976, 359275056, 988458426, 2722803495
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 3 with 4 colors (using symbols ".", "1", "2", "3", "4", "5", and "6") are:
    ...   1      .  N
    ..1   3    ..1  N L
    .1.   2     1.
    .11   3    .11  N L
    .12   3    .12  N L
    111   1      1  N
    112   3    112  N L
    121   2     21
    122   3    122  N L
    123   3    123  N L
    222   1      2  N
    223   3    223  N L
    232   2     32
    233   3    233  N L
    234   3    234  N L
    333   1      3  N
    334   3    334  N L
    343   2     43
    344   3    344  N L
    345   3    345  N L
    444   1      4  N
    445   3    445  N L
    454   2     54
    455   3    455  N L
    456   3    456  N L
    555   1      5  N
    556   3    556  N L
    565   2     65
    566   3    566  N L
    666   1      6  N
There are 30 pre-necklaces, 24 necklaces, and 17 Lyndon words.
So a(3) = 24.
		

Crossrefs

Cf. A215327 (smooth necklaces with 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).

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

A215332 Smooth Lyndon words with 5 colors.

Original entry on oeis.org

1, 5, 4, 11, 26, 71, 173, 450, 1132, 2898, 7393, 18987, 48796, 125963, 325786, 845153, 2197255, 5725849, 14950221, 39110366, 102488189, 269002371, 707090144, 1861183842, 4905157159, 12942843383
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 A215331).
		

Crossrefs

Cf. A215332 (smooth necklaces, 5 colors), A215327 (smooth necklaces, 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-8 of 8 results.