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.

A124721 Number of ternary Lyndon words with exactly three 1's.

Original entry on oeis.org

2, 8, 26, 80, 224, 596, 1536, 3840, 9384, 22528, 53248, 124240, 286720, 655360, 1485472, 3342336, 7471104, 16602432, 36700160, 80740352, 176859776, 385875968, 838860800, 1817531648, 3925868544, 8455716864, 18164132352, 38923141120
Offset: 4

Views

Author

Mike Zabrocki, Nov 05 2006

Keywords

Examples

			a(5) = 8 because 11122, 11212, 11123, 11132, 11213, 11312, 11133, 11313 are all ternary Lyndon words of length 5 with three 1's
		

Crossrefs

Formula

G.f.: 2*x^4*(x - 1)^2/(1-2*x^3)/(1-2*x)^3 = (x^3/(1-2*x)^3-x^3/(1-2*x^3))/3

A124722 Number of ternary Lyndon words with exactly four 1's.

Original entry on oeis.org

2, 9, 40, 137, 448, 1336, 3840, 10540, 28160, 73168, 186368, 465808, 1146880, 2785024, 6684672, 15875520, 37355520, 87161600, 201850880, 464254208, 1061158912, 2411718656, 5452595200, 12268325888, 27481079808, 61303918592
Offset: 5

Views

Author

Mike Zabrocki, Nov 05 2006

Keywords

Examples

			a(6) = 9 because 111122, 111212, 111123, 111213, 112113, 111132, 111312, 111133, 111313 are all ternary Lyndon words with four 1's
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{8,-20,0,76,-96,-32,128,-64},{2,9,40,137,448,1336,3840,10540},40] (* Harvey P. Dale, Nov 04 2020 *)

Formula

G.f.: x^5*(2-3*x)*(1-x)^2/(1 - 2*x^2)^2/(1 - 2*x)^4 = (1/(1-2*x)^4-1/(1-2*x^2)^2)/4

A124723 Number of ternary Lyndon words with exactly five 1's.

Original entry on oeis.org

2, 12, 56, 224, 806, 2688, 8448, 25344, 73216, 205004, 559104, 1490944, 3899392, 10027008, 25401752, 63504384, 156893184, 383516672, 928514048, 2228433712, 5305794560, 12540968960, 29444014080, 68702699520, 159390262880
Offset: 6

Views

Author

Mike Zabrocki, Nov 05 2006

Keywords

Examples

			a(7) = 12 because 11111ab, 1111a1b, 111a11b where ab = 22, 23, 32 or 33 are all ternary Lyndon words of length 7 with five 1's.
		

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([[806, 224, 56, 12, 2, 0$5]]). Matrix(10, (i,j)-> `if`(i=j-1, 1, `if`(j=1, [10, -40, 80, -80, 34, -20, 80, -160, 160, -64] [i], 0)))^(n-10))[1,1]: seq(a(n), n=6..30);  # Alois P. Heinz, Aug 04 2008

Formula

G.f.: 2*x^6*(1-2*x+3*x^2)*(1-x)^2/(1-2*x^5)/(1-2*x)^5= (1/(1-2*x)^5-1/(1-2*x^5))/5.

A124810 Number of 4-ary Lyndon words of length n with exactly two 1s.

Original entry on oeis.org

3, 12, 54, 198, 729, 2538, 8748, 29484, 98415, 324648, 1062882, 3454002, 11160261, 35871174, 114791256, 365893848, 1162261467, 3680484804, 11622614670, 36611206686, 115063885233, 360882096930, 1129718145924, 3530368940292
Offset: 3

Views

Author

Mike Zabrocki, Nov 08 2006

Keywords

Comments

If the offsets are modified, A124810 to A124813 are the 2nd to 5th Witt transform of A000244 [Moree]. - R. J. Mathar, Nov 08 2008

Examples

			a(4) = 12 because 1122, 1123, 1124, 1132, 1133, 1134, 1142, 1143, 1144, 1213, 1214, 1314 are all 4-ary Lyndon words with length 4 and have exactly two 1s.
		

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([[12, 3, 0, 0]]). Matrix(4, (i,j)-> if (i=j-1) then 1 elif j=1 then [6, -6, -18, 27][i] else 0 fi)^(n-4))[1,1]: seq(a(n), n=3..26); # Alois P. Heinz, Aug 04 2008
  • Mathematica
    a[n_] := (1/2)*(n-1)*3^(n-2) - If[OddQ[n], 0, (1/2)*3^((n-2)/2)];
    Array[a, 24, 3] (* Jean-François Alcover, Sep 19 2017 *)

Formula

O.g.f.: 3 x^3 (1-2 x)/((1-3x)^2 (1-3x^2)) = 1/2*((x/(1-3*x))^2 - x^2/(1-3*x^2)).
a(n) = 1/2*sum_{d|2,d|n} mu(d) C(n/d-1,(n-2)/d )*3^((n-2)/d) =1/2*(n-1)*3^(n-2) if n is odd =1/2*(n-1)*3^(n-2) - 1/2*3^((n-2)/2) if n is even.
a(2n+1) = A230540(n)/2. - R. J. Mathar, Jul 20 2025

A123223 Triangle read by rows: T(n,k) = number of ternary Lyndon words of length n with exactly k 1's.

Original entry on oeis.org

1, 2, 1, 1, 2, 0, 2, 4, 2, 0, 3, 8, 5, 2, 0, 6, 16, 16, 8, 2, 0, 9, 32, 38, 26, 9, 2, 0, 18, 64, 96, 80, 40, 12, 2, 0, 30, 128, 220, 224, 137, 56, 13, 2, 0, 56, 256, 512, 596, 448, 224, 74, 16, 2, 0, 99, 512, 1144, 1536, 1336, 806, 332, 96, 17, 2, 0, 186, 1024, 2560, 3840, 3840
Offset: 0

Views

Author

Mike Zabrocki, Nov 05 2006

Keywords

Comments

Sum of rows equal to number of ternary Lyndon words A027376 first column (k=0) is equal to the number of binary Lyndon words A001037 third through sixth column (k=2,3,4,5) equal to A124720, A124721, A124722, A124723 T(n+1,n-1) entry equal to A042948.

Examples

			Triangle begins:
   1;
   2,  1;
   1,  2,  0;
   2,  4,  2,  0;
   3,  8,  5,  2,  0;
   6, 16, 16,  8,  2,  0;
   9, 32, 38, 26,  9,  2, 0;
  18, 64, 96, 80, 40, 12, 2, 0;
T(n,1) = 2^(n-1) because all words beginning with a 1 and consisting of the rest 2's or 3's are ternary Lyndon words with exactly one 1.
		

Crossrefs

Formula

G.f. for columns (except for k=0) given by 1/k*Sum_{d|k} mu(d) x^k/(1-2*x^d)^(k/d) T(0,0) = 1 and T(n,0) = 1/n*Sum_{d|n} mu(d)*2^(n/d) T(n,n) = 0 if n>1, T(n,n-1) = 2.
Showing 1-5 of 5 results.