A214943 T(n,k) = Number of squarefree words of length n in a (k+1)-ary alphabet.
2, 3, 2, 4, 6, 2, 5, 12, 12, 0, 6, 20, 36, 18, 0, 7, 30, 80, 96, 30, 0, 8, 42, 150, 300, 264, 42, 0, 9, 56, 252, 720, 1140, 696, 60, 0, 10, 72, 392, 1470, 3480, 4260, 1848, 78, 0, 11, 90, 576, 2688, 8610, 16680, 15960, 4848, 108, 0, 12, 110, 810, 4536, 18480, 50190, 80040
Offset: 1
Examples
Some solutions for n=6 k=4 ..0....1....1....0....4....4....4....0....2....2....1....2....1....4....1....1 ..2....0....4....4....3....0....0....4....1....3....4....0....0....2....0....3 ..1....4....2....1....2....3....2....1....0....4....3....2....2....1....2....1 ..4....3....4....2....3....1....4....2....4....1....2....4....4....3....4....4 ..1....0....3....0....0....4....2....3....2....0....1....3....0....4....2....3 ..0....2....1....3....1....0....3....1....4....4....0....0....1....3....0....1
Links
- R. H. Hardin, Table of n, a(n) for n = 1..245
- A. M. Shur, Growth of Power-Free Languages over Large Alphabets, CSR 2010, LNCS vol. 6072, 350-361.
- A. M. Shur, Numerical values of the growth rates of power-free languages, arXiv:1009.4415 [cs.FL], 2010.
Crossrefs
Programs
-
Python
from itertools import product def T(n, k): if n == 1: return k+1 symbols = "".join(chr(48+i) for i in range(k+1)) squares = ["".join(u)*2 for r in range(1, n//2 + 1) for u in product(symbols, repeat = r)] words = ("0" + "".join(w) for w in product(symbols, repeat=n-1)) return (k+1)*sum(all(s not in w for s in squares) for w in words) def atodiag(maxd): # maxd antidiagonals return [T(n, d+1-n) for d in range(1, maxd+1) for n in range(1, d+1)] print(atodiag(11)) # Michael S. Branicky, May 20 2021
Formula
From Arseny Shur, Apr 26 2015: (Start)
Let L_k be the limit lim T(n,k)^{1/n}, which exists because T(n,k) is a submultiplicative sequence for any k. Then L_k=k-1/k-1/k^3-O(1/k^5) (Shur, 2010).
Exact values of L_k for small k, rounded up to several decimal places:
L_2=1.30176..., L_3=2.6215080..., L_4=3.7325386... (for L_5,...,L_14 see Shur arXiv:1009.4415).
Empirical observation: for k=2 the O-term in the general formula is slightly bigger than 2/k^5, and for k=3,...,14 this O-term is slightly smaller than 2/k^5.
(End)
Comments