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.

A253638 Number of zeros in the decimal expansion of 5^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 2, 1, 1, 1, 0, 0, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 0, 1, 2, 0, 3, 3, 2, 2, 3, 3, 4, 1, 1, 1, 4, 7, 4, 4, 5, 4, 3, 4, 6, 6, 3, 5, 2, 2, 0, 3, 4, 5, 6, 7, 8, 6, 6, 5, 7, 8, 8, 6, 8, 4, 3, 3, 6, 5, 4, 4, 8, 7, 4, 4, 3, 1, 4, 6, 4, 4, 6, 5, 6, 7, 6, 4, 4, 4, 6, 9, 12, 8, 5, 9, 7, 6, 4, 2, 9, 8, 5, 5, 3, 4, 6, 6, 9, 14, 12, 12, 12, 12, 13
Offset: 0

Views

Author

Zak Seidov, Jan 07 2015

Keywords

Comments

Probably a(58) is the last 0 term.

Examples

			5^57 = 6938893903907228377647697925567626953125, 2 zeros hence a(57) = 2,
5^58 = 34694469519536141888238489627838134765625, no zeros hence a(58) = 0,
5^59 = 173472347597680709441192448139190673828125, 3 zeros hence a(59) = 3.
		

Crossrefs

Cf. A008839 (no zeros in 5^n), A055641 (number of zeros for n), A000351 (5^n).

Programs

  • Mathematica
    Table[Count[IntegerDigits[5^n],0],{n,0,200}]
  • PARI
    a(n) = my(d = digits(5^n)); sum(i=1, #d, d[i] == 0); \\ Michel Marcus, Jan 15 2015

Formula

a(n) = A055641(A000351(n)). - Michel Marcus, Jan 15 2015