OFFSET
0,1
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
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