OFFSET
1,3
COMMENTS
a(25) > 2*10^9 if it exists. - Jon E. Schoenfield and Michael S. Branicky, Aug 02 2021
MATHEMATICA
Join[{0}, Select[Range@10000, FreeQ[IntegerDigits[2^#], 4] &]] (* Vincenzo Librandi, May 07 2015 *)
PROG
(Magma) [n: n in [0..1000] | not 4 in Intseq(2^n) ]; // Vincenzo Librandi, May 07 2015
(Python)
N = 200; modder = 10**N; REPORT = 10**5
def ok(s): return '4' not in s
def ok1(n): return ok(str(pow(2, n, modder)))
def afind(limit, startk=0, verbose=False):
full_tests = 0
for k in range(startk, limit):
if ok1(k):
full_tests += 1
if ok(str(pow(2, k))): print(k, end=", ")
if verbose and k and k%REPORT == 0:
print("[ ...", k, full_tests, "]")
k += 1
afind(10**6, verbose=True) # Michael S. Branicky, Aug 02 2021
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Nov 15 1998
EXTENSIONS
Initial 0 inserted by Vincenzo Librandi, May 07 2015
STATUS
approved