login
A171761
Number of ternary squareful words of length n.
0
0, 0, 3, 15, 63, 213, 687, 2127, 6483, 19575, 58905, 176943, 531177, 1593981, 4782513, 14348289, 43045923, 129139119, 387419097, 1162259637, 3486782013, 10460350023, 31381055463, 94143173409
OFFSET
0,3
FORMULA
a(n) = A000244(n) - A006156(n).
MATHEMATICA
nmax = 23; 3^Range[0, nmax] - Length /@ NestList[ DeleteCases[ Flatten[ Outer[ Append, #, {1, 2, 3}, 1], 1], {___, x__, x__, ___}] &, {{}}, nmax] (* Jean-François Alcover, Jun 12 2017, using Vladimir Reshetnikov's code for A006156 *)
CROSSREFS
Sequence in context: A364585 A260326 A204086 * A229277 A218313 A218190
KEYWORD
nonn
AUTHOR
Mats Granvik, Dec 18 2009
STATUS
approved