cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A034293 Numbers k such that 2^k does not contain the digit 2 (probably finite).

This page as a plain text file.
%I A034293 #52 Jul 10 2025 10:47:05
%S A034293 0,2,3,4,6,12,14,16,20,22,23,26,34,35,36,39,42,46,54,64,74,83,168
%N A034293 Numbers k such that 2^k does not contain the digit 2 (probably finite).
%C A034293 Is 168 the last term?
%C A034293 First row of A136291. - _R. J. Mathar_ Apr 29 2008
%C A034293 Equivalently, indices of zeros in A065710. - _M. F. Hasler_, Feb 10 2023
%F A034293 The last term is A094776(2), by definition. - _M. F. Hasler_, Feb 10 2023
%e A034293 Here is 2^168, conjecturally the largest power of 2 that does not contain a 2: 374144419156711147060143317175368453031918731001856. - _N. J. A. Sloane_, Feb 10 2023
%p A034293 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
%t A034293 Join[{0}, Select[ Range@10000, FreeQ[ IntegerDigits[2^# ], 2] &]] (* _Shyam Sunder Gupta_, Sep 01 2007 *)(* adapted by _Vincenzo Librandi_, May 07 2015 *)
%t A034293 Select[Range[0, 10^4], DigitCount[2^#][[2]] == 0 &] (* _Michael De Vlieger_, Apr 29 2016 *)
%o A034293 (Magma) [n: n in [0..1000] | not 2 in Intseq(2^n) ]; // _Vincenzo Librandi_, May 07 2015
%o A034293 (PARI) is(n)=setsearch(Set(digits(2^n)),2)==0 \\ _Charles R Greathouse IV_, May 10 2016
%o A034293 (PARI) is_A034293(n)=!foreach(digits(2^n),d,d==2&&return) \\ _M. F. Hasler_, Feb 10 2023
%o A034293 (Python)
%o A034293 def is_A034293(n): return'2'not in str(2**n)
%o A034293 [n for n in range(199) if is_A034293(n)] # _M. F. Hasler_, Feb 10 2023
%Y A034293 Cf. A007377.
%Y A034293 See also similar sequences listed in A035064.
%Y A034293 Cf. A065710 (number of '2's in 2^n), A094776.
%K A034293 base,nonn
%O A034293 1,2
%A A034293 _Erich Friedman_
%E A034293 Edited by _N. J. A. Sloane_, Oct 03 2007
%E A034293 Removed keyword "fini" since it is only a conjecture that this sequence contains only finitely many terms. - _Altug Alkan_, May 07 2016