login
A092451
Numbers that either contain the digit 2 or are divisible by 2.
8
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 121
OFFSET
0,2
LINKS
MATHEMATICA
Select[Range[0, 140], DigitCount[#, 10, 2]>0||Divisible[ #, 2]&] (* Harvey P. Dale, Jun 28 2011 *)
Select[Range[0, 300], Mod[#, 2] == 0||MemberQ[IntegerDigits[#], 2] &] (* Vincenzo Librandi, Jul 19 2016 *)
PROG
(PARI) isok(n) = !(n % 2) || vecsearch(vecsort(digits(n, 2), , 8), 2); \\ Michel Marcus, Jul 19 2016
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Mar 24 2004
EXTENSIONS
More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 25 2004
STATUS
approved