|
|
A272698
|
|
Powers of 2 with exactly one even decimal digit.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
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.
If there are any other terms in this sequence, they are greater than 2^10^10. - Charles R Greathouse IV, May 04 2016
|
|
LINKS
|
|
|
MATHEMATICA
|
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 *)
Select[2^Range[200], Count[IntegerDigits[#], _?EvenQ]==1&] (* Harvey P. Dale, Aug 20 2017 *)
|
|
PROG
|
(Ruby)
ary = []
s = 1
(1..10 ** 4).each{|i|
s *= 2
j = s.to_s.split('').map(&:to_i).select{|i| i % 2 == 0}.size
ary << s if j == 1
}
p ary
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|