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.

A210435 Number of digits in 5^n.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 26, 27, 28, 28, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 38, 38, 39, 40, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 47
Offset: 0

Views

Author

Luc Comeau-Montasse, Mar 21 2012

Keywords

Examples

			a(4) = 3 because 5^4 = 625, which has 3 digits.
a(5) = 4 because 5^5 = 3125, which has 4 digits.
		

Crossrefs

Number of digits in b^n: A034887 (b=2), A034888 (b=3), A210434 (b=4), A210435 (b=5), A210436 (b=6), A210062 (b=7).

Programs

  • Magma
    [#Intseq(5^n): n in [0..67]]; // Bruno Berselli, Mar 22 2012
    
  • Maple
    a:= n-> length(5^n): seq(a(n), n=0..100); # Alois P. Heinz, Mar 22 2012
  • Mathematica
    Table[Length[IntegerDigits[5^n]], {n, 0, 67}] (* Bruno Berselli, Mar 22 2012 *)
    IntegerLength[5^Range[0,70]] (* Harvey P. Dale, Mar 26 2013 *)
  • PARI
    a(n) = #Str(5^n); \\ Michel Marcus, Oct 27 2015

Formula

a(n) = A055642(A000351(n)) = A055642(5^n) = floor(log_10(10*(5^n))). [Jonathan Vos Post, Mar 22 2012]
a(n) + A034887(n) = n+1. - Michel Marcus, Oct 27 2015