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.

Showing 1-1 of 1 results.

A236314 Number of non-overlapping occurrences of n in the decimal representation of n^n.

Original entry on oeis.org

1, 0, 0, 0, 1, 3, 0, 0, 1, 1, 2, 0, 0, 0, 0, 2, 1, 0, 2, 0, 2, 0, 0, 1, 2, 0, 0, 1, 0, 0, 2, 2, 2, 0, 3, 1, 1, 0, 1, 0, 1, 1, 1, 0, 3, 1, 0, 1, 1, 1, 1, 2, 2, 1, 0, 1, 1, 0, 1, 3, 2, 0, 1, 1, 0, 2, 0, 0, 0, 0, 1, 0, 1, 1, 2, 5, 2, 1, 2, 0, 3, 3, 2, 1, 0, 1, 0
Offset: 1

Views

Author

Christian Perfect, Jan 22 2014

Keywords

Examples

			6^6 is 46656 with 3 6's, hence a(6) = 3.
		

Crossrefs

A049329 lists n where a(n) is nonzero.
The same sequence but allowing for overlapping occurrences is at A236322.

Programs

  • Mathematica
    a[n_] := Length@ StringPosition[ToString[n^n], ToString[n], Overlaps -> False]; (* Giovanni Resta, Jan 22 2014 *)
  • Python
    from itertools import count
    a=(str(n**n).count(str(n)) for n in count(1))
Showing 1-1 of 1 results.