login
A236314
Number of non-overlapping occurrences of n in the decimal representation of n^n.
2
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,6
LINKS
EXAMPLE
6^6 is 46656 with 3 6's, hence a(6) = 3.
MATHEMATICA
a[n_] := Length@ StringPosition[ToString[n^n], ToString[n], Overlaps -> False]; (* Giovanni Resta, Jan 22 2014 *)
PROG
(Python)
from itertools import count
a=(str(n**n).count(str(n)) for n in count(1))
CROSSREFS
A049329 lists n where a(n) is nonzero.
The same sequence but allowing for overlapping occurrences is at A236322.
Sequence in context: A100655 A262262 A079275 * A236322 A319419 A133574
KEYWORD
base,nonn,easy
AUTHOR
Christian Perfect, Jan 22 2014
STATUS
approved