OFFSET
1,1
COMMENTS
See A322053 for the number that do contain the specified string.
LINKS
Robert P. P. McKone, Table of n, a(n) for n = 1..1000
Jean-Paul Allouche, Jeffrey Shallit, and Manon Stipulanti, Combinatorics on words and generating Dirichlet series of automatic sequences, arXiv:2401.13524 [math.CO], 2024.
Index entries for linear recurrences with constant coefficients, signature (9,9).
FORMULA
G.f.: x*(10+9*x)/(1-9*x-9*x^2).
a(n) = 9*a(n-1) + 9*a(n-2) for n >= 3.
EXAMPLE
Suppose the string is 00. At length 2 there are 99 strings that do not contain it. At length 3 there are 19 strings that do not contain it, 000, 00x, and x00, where x is any nonzero digit. So a(3) = 1000-19 = 981.
MATHEMATICA
T[n_, k_] := LinearRecurrence[{n - 1, n - 1}, {n, n^2 - 1}, k];
T[10, {1, 19}] (* Robert P. P. McKone, Dec 31 2020 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Dec 21 2018
STATUS
approved