Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A124810
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A124810 Number of 4-ary Lyndon words of length n with exactly two 1s. +0
5
3, 12, 54, 198, 729, 2538, 8748, 29484, 98415, 324648, 1062882, 3454002, 11160261, 35871174, 114791256, 365893848, 1162261467, 3680484804, 11622614670, 36611206686, 115063885233, 360882096930, 1129718145924, 3530368940292 (list; graph; listen)
OFFSET

3,1

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

EXAMPLE

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.

MAPLE

(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); [From Alois P. Heinz (heinz(AT)hs-heilbronn.de), Aug 04 2008]

CROSSREFS

Cf. A124811, A124812, A124813, A124814, A004526, A124720.

Sequence in context: A110122 A060460 A120983 this_sequence A123348 A083881 A055835

Adjacent sequences: A124807 A124808 A124809 this_sequence A124811 A124812 A124813

KEYWORD

nonn

AUTHOR

Mike Zabrocki (zabrocki(AT)mathstat.yorku.ca), Nov 08 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research