The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248644 Evil numbers (A001969) remaining evil if any digit is deleted (zeros allowed). 3

%I #21 Mar 14 2020 15:52:52

%S 0,3,5,6,9,30,33,36,39,53,60,63,65,66,90,95,96,99,105,120,172,175,177,

%T 178,180,209,240,243,277,300,303,306,330,340,343,360,363,366,390,396,

%U 399,430,480,483,485,486,533,534,543,571,600,603,605,606,630,633,636,658,660,663

%N Evil numbers (A001969) remaining evil if any digit is deleted (zeros allowed).

%C Dual variant of A248642.

%C 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 172 is in the sequence since 172,72,12,17 are evil.

%o (Sage)

%o def is_evil(n):

%o if n==0:

%o return True

%o else:

%o return sum(Integer(n).digits(base=2))%2==0

%o def remain_evil(n):

%o if not(is_evil(n)):

%o return False

%o else:

%o L=Integer(n).digits(base=10)

%o M=[]

%o for i in [0..len(L)-1]:

%o G=L[0:i]+L[i+1:]

%o M.append(is_evil(sum(G[i]*10^i for i in [0..len(G)-1])))

%o return sum(M)==len(M)

%o [x for x in [0..500] if remain_evil(x)] # _Tom Edgar_, Oct 10 2014

%Y Cf. A001969, A248478, A248642, A248659.

%K nonn,base

%O 1,2

%A _Vladimir Shevelev_, Oct 10 2014

%E More terms from _Peter J. C. Moses_, Oct 10 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 19:55 EDT 2024. Contains 372919 sequences. (Running on oeis4.)