cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A171761 Number of ternary squareful words of length n.

This page as a plain text file.
%I A171761 #8 Jun 12 2017 07:09:10
%S A171761 0,0,3,15,63,213,687,2127,6483,19575,58905,176943,531177,1593981,
%T A171761 4782513,14348289,43045923,129139119,387419097,1162259637,3486782013,
%U A171761 10460350023,31381055463,94143173409
%N A171761 Number of ternary squareful words of length n.
%F A171761 a(n) = A000244(n) - A006156(n).
%t A171761 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 *)
%Y A171761 Cf. A000244, A006156.
%K A171761 nonn
%O A171761 0,3
%A A171761 _Mats Granvik_, Dec 18 2009