The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A051043 Number of quaternary cubefree words of length n. 1
 1, 4, 16, 60, 228, 864, 3264, 12336, 46632, 176208, 665892, 2516412, 9509364, 35935476, 135798588, 513176076, 1939267560, 7328398344 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Table of n, a(n) for n=0..17. Eric Weisstein's World of Mathematics, Cubefree Word. EXAMPLE a(3) counts the 64 three-letter words minus 000, 111, 222, and 333. PROG (Python) from itertools import product def cf(s): for l in range(1, len(s)//3+1): for i in range(len(s) - 3*l+1): if s[i:i+l]*2 == s[i+l:i+3*l]: return False return True def a(n): if n == 0: return 1 return 4*sum(cf("0"+"".join(w)) for w in product("0123", repeat=n-1)) print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Apr 16 2021 CROSSREFS Cf. A028445, A051042. Sequence in context: A032106 A269462 A047097 * A123620 A234008 A355351 Adjacent sequences: A051040 A051041 A051042 * A051044 A051045 A051046 KEYWORD nonn,more AUTHOR Eric W. Weisstein EXTENSIONS More terms from Sascha Kurz, Mar 22 2002 a(0) prepended and a(16)-a(17) from Michael S. Branicky, Apr 16 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 9 10:11 EDT 2024. Contains 375764 sequences. (Running on oeis4.)