A007958 Even numbers with at least one odd digit.
10, 12, 14, 16, 18, 30, 32, 34, 36, 38, 50, 52, 54, 56, 58, 70, 72, 74, 76, 78, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
- F. Smarandache, Only Problems, Not Solutions!
- Index entries for 10-automatic sequences.
Programs
-
Mathematica
Select[2*Range[100],Or@@OddQ[IntegerDigits[#]]&] (* Harvey P. Dale, Apr 01 2013 *)
-
PARI
is(n)=n%2==0 && vecsum(Set(digits(n)%2)) \\ Charles R Greathouse IV, Oct 23 2015
-
Python
def ok(n): return n%2 == 0 and set(str(n)) & set("13579") != set() print(list(filter(ok, range(163)))) # Michael S. Branicky, Oct 12 2021
Formula
a(n) ~ 2n. - Charles R Greathouse IV, Oct 23 2015
Extensions
New name from Charles R Greathouse IV, Feb 14 2017, based on comment from Harvey P. Dale, Apr 01 2013
Comments