The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A063567 Smallest positive power of 4 having n in its decimal representation. 2
5, 2, 4, 7, 1, 4, 2, 10, 7, 6, 5, 20, 25, 35, 9, 29, 2, 17, 15, 11, 28, 9, 36, 29, 5, 4, 9, 19, 24, 16, 11, 37, 38, 43, 35, 14, 8, 15, 7, 21, 6, 11, 16, 11, 9, 14, 21, 18, 10, 16, 26, 20, 30, 8, 14, 8, 4, 10, 25, 22, 22, 29, 9, 7, 3, 8, 23, 12, 14, 17, 23, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
MATHEMATICA
a = {}; Do[k = 1; While[ StringPosition[ ToString[4^k], ToString[n] ] == {}, k++ ]; a = Append[a, k], {n, 0, 50} ]; a
sp4[n_]:=Module[{k=1, idn=IntegerDigits[n]}, While[SequenceCount[ IntegerDigits[ 4^k], idn] == 0, k++]; k]; Array[sp4, 70, 0] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Mar 12 2016 *)
PROG
(Python)
def a(n):
target, k, pow4 = str(n), 1, 4
while not target in str(pow4): k, pow4 = k+1, pow4*4
return k
print([a(n) for n in range(72)]) # Michael S. Branicky, May 02 2021
CROSSREFS
Essentially the same as A062521.
Sequence in context: A267830 A163334 A029683 * A072223 A246312 A124907
KEYWORD
base,nonn
AUTHOR
Robert G. Wilson v, Aug 10 2001
EXTENSIONS
Name edited and more terms from Michael S. Branicky, May 02 2021
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 June 14 23:20 EDT 2024. Contains 373401 sequences. (Running on oeis4.)