login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A088950
Number of square-subwords in ternary representation of n.
3
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,14
COMMENTS
A square-(sub)word consists of two nonempty identical adjacent subwords.
LINKS
Eric Weisstein's World of Mathematics, Squarefree Word
EXAMPLE
n=90: a(90)=2 because 90 -> '10100' has 2 square-subwords: 00 and 1010.
MATHEMATICA
Table[SequenceCount[IntegerDigits[n, 3], {x__, x__}, Overlaps -> All], {n, 0, 100}] (* Vladimir Reshetnikov, May 17 2016 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 25 2003
STATUS
approved