login
A035059
Numbers k such that 2^k does not contain the digit 4 (probably finite).
1
0, 1, 3, 4, 5, 7, 8, 9, 13, 15, 16, 17, 21, 23, 24, 29, 40, 41, 43, 55, 69, 75, 85, 107
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
Cf. similar sequences listed in A035064.
Sequence in context: A341416 A081376 A055074 * A353980 A137832 A137838
KEYWORD
nonn,base,more
AUTHOR
Patrick De Geest, Nov 15 1998
EXTENSIONS
Initial 0 inserted by Vincenzo Librandi, May 07 2015
STATUS
approved