OFFSET
1,2
COMMENTS
Dual variant of A248642.
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.
EXAMPLE
172 is in the sequence since 172,72,12,17 are evil.
PROG
(Sage)
def is_evil(n):
if n==0:
return True
else:
return sum(Integer(n).digits(base=2))%2==0
def remain_evil(n):
if not(is_evil(n)):
return False
else:
L=Integer(n).digits(base=10)
M=[]
for i in [0..len(L)-1]:
G=L[0:i]+L[i+1:]
M.append(is_evil(sum(G[i]*10^i for i in [0..len(G)-1])))
return sum(M)==len(M)
[x for x in [0..500] if remain_evil(x)] # Tom Edgar, Oct 10 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Shevelev, Oct 10 2014
EXTENSIONS
More terms from Peter J. C. Moses, Oct 10 2014
STATUS
approved