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.

A240962 Number of zeros in the decimal expansion of n^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 1, 2, 2, 3, 2, 2, 1, 2, 1, 21, 1, 0, 5, 2, 3, 6, 3, 1, 1, 32, 6, 5, 7, 7, 3, 3, 6, 8, 6, 42, 5, 6, 10, 10, 5, 11, 4, 12, 11, 53, 5, 6, 12, 10, 8, 11, 15, 9, 5, 64, 12, 15, 14, 16, 13, 12, 13, 9, 16, 79, 12, 16, 15, 12, 14, 15
Offset: 1

Views

Author

Anthony Sand, Aug 05 2014

Keywords

Examples

			a(1) = zerocount(1^1) = zerocount(1) = 0.
a(8) = zerocount(8^8) = zerocount(16777216) = 0.
a(9) = zerocount(9^9) = zerocount(387420489) = 1.
a(10) = zerocount(10^10) = zerocount(10000000000) = 10.
		

Crossrefs

Programs

  • Maple
    seq(numboccur(0,convert(n^n,base,10)), n=1 .. 100); # Robert Israel, Aug 05 2014
  • Mathematica
    Map[Count[IntegerDigits[#^#], 0] &, Range[2, 100]] (* Michael De Vlieger, Aug 06 2014 *)
  • PARI
    a(n) = my(d = digits(n^n)); sum(i=1, #d, ! d[i]); \\ Michel Marcus, Aug 10 2014
  • Python
    for n in range(1,10**3):
      print(str(n**n).count('0'),end=', ') # Derek Orr, Aug 05 2014
    

Formula

a(n) = A055641(A000312(n)). - Michel Marcus, Aug 07 2014