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!)
A353007 Nonnegative integers in which any odd digit, if present, occurs an even number of times, and any even digit, if present, occurs an odd number of times. 3

%I #20 Apr 17 2022 09:26:47

%S 0,2,4,6,8,11,20,24,26,28,33,40,42,46,48,55,60,62,64,68,77,80,82,84,

%T 86,99,101,110,112,114,116,118,121,141,161,181,204,206,208,211,222,

%U 233,240,246,248,255,260,264,268,277,280,284,286,299,303,323,330,332,334

%N Nonnegative integers in which any odd digit, if present, occurs an even number of times, and any even digit, if present, occurs an odd number of times.

%C Like the converse of A333369.

%e 181 is a 3-digit term because it has two 1's and one 8.

%t q[n_] := AllTrue[Tally @ IntegerDigits[n], OddQ[Plus @@ #] &]; Select[Range[0, 300], q] (* _Amiram Eldar_, Apr 15 2022 *)

%o (PARI) isok(m) = my(d=digits(m), s=Set(d)); for (i=1, #s, if (#select(x->(x==s[i]), d) % 2 == (s[i] % 2), return (0))); return (1); \\ _Michel Marcus_, Apr 15 2022

%o (Python)

%o def ok(n): s = str(n); return all(s.count(d)%2 != int(d)%2 for d in set(s))

%o print([k for k in range(335) if ok(k)]) # _Michael S. Branicky_, Apr 15 2022~

%Y Cf. A333369.

%K nonn,base

%O 1,2

%A _Bernard Schott_, Apr 15 2022

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 June 17 13:40 EDT 2024. Contains 373445 sequences. (Running on oeis4.)