OFFSET
1,2
COMMENTS
Is 168 the last term?
First row of A136291. - R. J. Mathar Apr 29 2008
Equivalently, indices of zeros in A065710. - M. F. Hasler, Feb 10 2023
FORMULA
The last term is A094776(2), by definition. - M. F. Hasler, Feb 10 2023
EXAMPLE
Here is 2^168, conjecturally the largest power of 2 that does not contain a 2:
374144419156711147060143317175368453031918731001856. - N. J. A. Sloane, Feb 10 2023
MAPLE
isA034293 := proc(n) RETURN(not 2 in convert(2^n, base, 10)) ; end: for n from 0 to 100000 do if isA034293(n) then print(n) ; fi ; od: # R. J. Mathar, Oct 04 2007
MATHEMATICA
Join[{0}, Select[ Range@10000, FreeQ[ IntegerDigits[2^# ], 2] &]] (* Shyam Sunder Gupta, Sep 01 2007 *)(* adapted by Vincenzo Librandi, May 07 2015 *)
Select[Range[0, 10^4], DigitCount[2^#][[2]] == 0 &] (* Michael De Vlieger, Apr 29 2016 *)
PROG
(Magma) [n: n in [0..1000] | not 2 in Intseq(2^n) ]; // Vincenzo Librandi, May 07 2015
(PARI) is(n)=setsearch(Set(digits(2^n)), 2)==0 \\ Charles R Greathouse IV, May 10 2016
(PARI) is_A034293(n)=!foreach(digits(2^n), d, d==2&&return) \\ M. F. Hasler, Feb 10 2023
(Python)
def is_A034293(n): return'2'not in str(2**n)
[n for n in range(199) if is_A034293(n)] # M. F. Hasler, Feb 10 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Oct 03 2007
Removed keyword "fini" since it is only a conjecture that this sequence contains only finitely many terms. - Altug Alkan, May 07 2016
STATUS
approved