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 A124813 #18 Jan 26 2025 09:09:00 %S A124813 3,27,189,1134,6123,30618,144342,649539,2814669,11821608,48361131, %T A124813 193444524,758897748,2927177028,11123272701,41712272649,154580775111, %U A124813 566796175407,2058365058057,7410114208989,26464693603590,93829368230910 %N A124813 Number of 4-ary Lyndon words of length n with exactly five 1s. %H A124813 G. C. Greubel, <a href="/A124813/b124813.txt">Table of n, a(n) for n = 6..1000</a> %H A124813 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (15,-90,270,-405,246,-45,270,-810,1215,-729). %F A124813 O.g.f.: 3*x^6*(1 - 6*x + 18*x^2 - 27*x^3 + 16*x^4)/((1 - 3*x)^5*(1 - 3*x^5)). %F A124813 O.g.f.: (1/5)*((x/(1-3*x))^5 - x^5/(1-3*x^5)). %F A124813 a(n) = (1/5)*Sum_{d|5, d|n} mu(d)*C(n/d-1, (n-5)/d )*3^((n-5)/d). %F A124813 a(n) = (1/5)*C(n-1, 4)*3^(n-5) if n=1,2,3,4 mod 5. %F A124813 a(n) = (1/5)*C(n-1, 4)*3^(n-5) - (1/5)*3^((n-5)/5) if n=0 mod 5. %e A124813 a(7) = 27 because 11111ab, 1111a1b, 111a11b for a,b=2,3,4 are all Lyndon of length 7. %t A124813 3*(1 -6*x +18*x^2 -27*x^3 +16*x^4)/((1-3*x)^5*(1-3*x^5)) + O[x]^22 // CoefficientList[#, x]& (* _Jean-François Alcover_, Sep 19 2017 *) %o A124813 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 3*x^6*(1-6*x+18*x^2-27*x^3+16*x^4)/((1-3*x)^5*(1-3*x^5)) )); // _G. C. Greubel_, Aug 17 2023 %o A124813 (SageMath) %o A124813 def f(x): return 3*x^6*(1-6*x+18*x^2-27*x^3+16*x^4)/((1-3*x)^5*(1-3*x^5)) %o A124813 def A124813_list(prec): %o A124813 P.<x> = PowerSeriesRing(ZZ, prec) %o A124813 return P( f(x) ).list() %o A124813 a=A124813_list(46); a[6:] # _G. C. Greubel_, Aug 17 2023 %Y A124813 Cf. A011795, A124723, A124810, A124811, A124812, A124814. %K A124813 nonn,easy %O A124813 6,1 %A A124813 _Mike Zabrocki_, Nov 08 2006