login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A272698 Powers of 2 with exactly one even decimal digit. 1

%I #15 Aug 20 2017 12:53:10

%S 2,4,8,16,32,512

%N Powers of 2 with exactly one even decimal digit.

%C The number of even digits of powers of 2 is more than 0. However, it seems there are few powers of 2 with 1 even digit.

%C If there are any other terms in this sequence, they are greater than 2^10^10. - _Charles R Greathouse IV_, May 04 2016

%t Select[2^Range[0, 50000], Total@ Pick[DigitCount@ #, {0, 1, 0, 1, 0, 1, 0, 1, 0, 1}, 1] == 1 &] (* _Michael De Vlieger_, May 04 2016 *)

%t Select[2^Range[200],Count[IntegerDigits[#],_?EvenQ]==1&] (* _Harvey P. Dale_, Aug 20 2017 *)

%o (Ruby)

%o ary = []

%o s = 1

%o (1..10 ** 4).each{|i|

%o s *= 2

%o j = s.to_s.split('').map(&:to_i).select{|i| i % 2 == 0}.size

%o ary << s if j == 1

%o }

%o p ary

%o (PARI) is(n)=my(d=digits(n)); n>1 && n>>valuation(n,2)==1 && sum(i=1,#d,d[i]%2==0)==1 \\ _Charles R Greathouse IV_, May 04 2016

%K nonn,base

%O 1,1

%A _Seiichi Manyama_, May 04 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 02:23 EDT 2024. Contains 371906 sequences. (Running on oeis4.)