A063568 5^a(n) is the smallest positive power of 5 having n in its decimal representation.
8, 3, 2, 5, 11, 1, 4, 7, 7, 8, 14, 23, 3, 30, 12, 6, 20, 15, 22, 9, 13, 33, 13, 22, 12, 2, 18, 37, 11, 17, 15, 5, 19, 35, 19, 14, 20, 21, 18, 8, 12, 12, 37, 20, 12, 17, 18, 21, 11, 26, 23, 14, 16, 9, 30, 23, 6, 15, 16, 24, 24
Offset: 0
Links
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
Crossrefs
Essentially the same as A062522.
Programs
-
Mathematica
a = {}; Do[k = 1; While[ StringPosition[ ToString[5^k], ToString[n]] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a sp5[n_]:=Module[{k=1,idn=IntegerDigits[n]},While[SequenceCount[ IntegerDigits[ 5^k], idn] == 0,k++];k]; Array[sp5,70,0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 05 2019 *)