OFFSET
0,1
COMMENTS
Variant of A062525 allowing only exponents larger than zero. [From R. J. Mathar, Dec 15 2008]
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
MATHEMATICA
a = {}; Do[k = 1; While[ StringPosition[ ToString[8^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 60} ]; a
sp8[n_]:=Module[{k=1}, While[SequenceCount[IntegerDigits[ 8^k], IntegerDigits[ n]]<1, k++]; k]; Array[sp8, 70, 0] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 07 2017 *)
PROG
(Python)
def a(n):
k, pow8, s = 1, 8, str(n)
while s not in str(pow8): k += 1; pow8 *= 8
return k
print([a(n) for n in range(61)]) # Michael S. Branicky, Apr 03 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
STATUS
approved