# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a248644 Showing 1-1 of 1 %I A248644 #21 Mar 14 2020 15:52:52 %S A248644 0,3,5,6,9,30,33,36,39,53,60,63,65,66,90,95,96,99,105,120,172,175,177, %T A248644 178,180,209,240,243,277,300,303,306,330,340,343,360,363,366,390,396, %U A248644 399,430,480,483,485,486,533,534,543,571,600,603,605,606,630,633,636,658,660,663 %N A248644 Evil numbers (A001969) remaining evil if any digit is deleted (zeros allowed). %C A248644 Dual variant of A248642. %C A248644 Although for numbers >9 we never put 0 instead of the removed digit, we include single-digit numbers 0,3,5,6,9 since, e.g., 3=03, etc. %e A248644 172 is in the sequence since 172,72,12,17 are evil. %o A248644 (Sage) %o A248644 def is_evil(n): %o A248644 if n==0: %o A248644 return True %o A248644 else: %o A248644 return sum(Integer(n).digits(base=2))%2==0 %o A248644 def remain_evil(n): %o A248644 if not(is_evil(n)): %o A248644 return False %o A248644 else: %o A248644 L=Integer(n).digits(base=10) %o A248644 M=[] %o A248644 for i in [0..len(L)-1]: %o A248644 G=L[0:i]+L[i+1:] %o A248644 M.append(is_evil(sum(G[i]*10^i for i in [0..len(G)-1]))) %o A248644 return sum(M)==len(M) %o A248644 [x for x in [0..500] if remain_evil(x)] # _Tom Edgar_, Oct 10 2014 %Y A248644 Cf. A001969, A248478, A248642, A248659. %K A248644 nonn,base %O A248644 1,2 %A A248644 _Vladimir Shevelev_, Oct 10 2014 %E A248644 More terms from _Peter J. C. Moses_, Oct 10 2014 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE