A034293 Numbers k such that 2^k does not contain the digit 2 (probably finite).
0, 2, 3, 4, 6, 12, 14, 16, 20, 22, 23, 26, 34, 35, 36, 39, 42, 46, 54, 64, 74, 83, 168
Offset: 1
Examples
Here is 2^168, conjecturally the largest power of 2 that does not contain a 2: 374144419156711147060143317175368453031918731001856. - _N. J. A. Sloane_, Feb 10 2023
Crossrefs
Programs
-
Magma
[n: n in [0..1000] | not 2 in Intseq(2^n) ]; // Vincenzo Librandi, May 07 2015
-
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 *)
-
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
Formula
The last term is A094776(2), by definition. - M. F. Hasler, Feb 10 2023
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
Comments