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.

A088950 Number of square-subwords in ternary representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 25 2003

Keywords

Comments

A square-(sub)word consists of two nonempty identical adjacent subwords.

Examples

			n=90: a(90)=2 because 90 -> '10100' has 2 square-subwords: 00 and 1010.
		

Crossrefs

Programs

  • Mathematica
    Table[SequenceCount[IntegerDigits[n, 3], {x__, x__}, Overlaps -> All], {n, 0, 100}] (* Vladimir Reshetnikov, May 17 2016 *)