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
Michel Marcus, Table of n, a(n) for n = 1..10000
Project Euler, Problem 520: Simbers.
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))
print([k for k in range(323) if ok(k)]) # Michael S. Branicky, Apr 15 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 17 2020
STATUS
approved