|
|
A333369
|
|
Positive integers in which any odd digit, if present, occurs an odd number of times, and any even digit, if present, occurs an even number of times.
|
|
10
|
|
|
1, 3, 5, 7, 9, 13, 15, 17, 19, 22, 31, 35, 37, 39, 44, 51, 53, 57, 59, 66, 71, 73, 75, 79, 88, 91, 93, 95, 97, 100, 111, 122, 135, 137, 139, 144, 153, 157, 159, 166, 173, 175, 179, 188, 193, 195, 197, 212, 221, 223, 225, 227, 229, 232, 252, 272, 292, 300, 315, 317, 319, 322
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Inspired by the 520th problem of Project Euler (see link) where such a number is called a "simber".
This sequence has little mathematical interest. The name "simber", which might be interpreted as "silly number", is deprecated. - N. J. A. Sloane, Aug 04 2022
The number of terms with respectively 1, 2, 3, ... digits is 5, 24, 130, ...
|
|
LINKS
|
|
|
EXAMPLE
|
656 is a 3-digit term because it has one 5 and two 6's.
447977 is a 6-digit term because it has one 9, two 4's and three 7's.
|
|
MATHEMATICA
|
seqQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[300], seqQ] (* Amiram Eldar, Mar 17 2020 *)
|
|
PROG
|
(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, Mar 17 2020
(Python)
def ok(n): s = str(n); return all(s.count(d)%2 == int(d)%2 for d in set(s))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|