login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A034293
Numbers k such that 2^k does not contain the digit 2 (probably finite).
9
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,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
Cf. A007377.
See also similar sequences listed in A035064.
Sequence in context: A018309 A245481 A039038 * A136291 A128393 A368988
KEYWORD
base,nonn
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