login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A063571 Smallest power of 8 having n in its decimal representation. 2
4, 3, 3, 5, 2, 3, 2, 5, 1, 4, 10, 14, 3, 9, 6, 7, 8, 9, 10, 12, 7, 6, 17, 21, 10, 17, 6, 5, 9, 20, 26, 25, 5, 21, 9, 15, 12, 10, 13, 14, 4, 10, 9, 14, 6, 11, 14, 12, 17, 13, 18, 3, 7, 29, 13, 13, 16, 25, 11, 11, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Variant of A062525 allowing only exponents larger than zero. [From R. J. Mathar, Dec 15 2008]
LINKS
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
Sequence in context: A222616 A011762 A195780 * A005589 A362123 A052360
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 06:04 EDT 2024. Contains 371906 sequences. (Running on oeis4.)