A088950 Number of square-subwords in ternary representation of n.
0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 2, 2, 1, 1, 1, 1, 0, 0, 0, 1, 2, 1, 1, 2, 4, 2, 1, 1, 2, 1, 0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 2, 1, 0, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 4, 2, 2, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 0, 0, 1, 1, 0, 1
Offset: 0
Examples
n=90: a(90)=2 because 90 -> '10100' has 2 square-subwords: 00 and 1010.
Links
- Eric Weisstein's World of Mathematics, Squarefree Word
Programs
-
Mathematica
Table[SequenceCount[IntegerDigits[n, 3], {x__, x__}, Overlaps -> All], {n, 0, 100}] (* Vladimir Reshetnikov, May 17 2016 *)
Comments