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 A124810 #15 Jul 20 2025 09:21:52 %S A124810 3,12,54,198,729,2538,8748,29484,98415,324648,1062882,3454002, %T A124810 11160261,35871174,114791256,365893848,1162261467,3680484804, %U A124810 11622614670,36611206686,115063885233,360882096930,1129718145924,3530368940292 %N A124810 Number of 4-ary Lyndon words of length n with exactly two 1s. %C A124810 If the offsets are modified, A124810 to A124813 are the 2nd to 5th Witt transform of A000244 [Moree]. - _R. J. Mathar_, Nov 08 2008 %H A124810 Pieter Moree, <a href="http://dx.doi.org/10.1016/j.disc.2005.03.004">The formal series Witt transform</a>, Discr. Math. no. 295 vol. 1-3 (2005) 143-160. [From _R. J. Mathar_, Nov 08 2008] %H A124810 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (6, -6, -18, 27). %F A124810 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)). %F A124810 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. %F A124810 a(2n+1) = A230540(n)/2. - _R. J. Mathar_, Jul 20 2025 %e A124810 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. %p A124810 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 %t A124810 a[n_] := (1/2)*(n-1)*3^(n-2) - If[OddQ[n], 0, (1/2)*3^((n-2)/2)]; %t A124810 Array[a, 24, 3] (* _Jean-François Alcover_, Sep 19 2017 *) %Y A124810 Cf. A124811, A124812, A124813, A124814, A004526, A124720. %K A124810 nonn,easy %O A124810 3,1 %A A124810 _Mike Zabrocki_, Nov 08 2006