cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Bernard Schott, Mar 17 2020

Keywords

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, ...

Examples

			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.
		

Crossrefs

Cf. A108571 (finite subsequence), A353007.

Programs

  • Mathematica
    seqQ[n_] := AllTrue[Tally @ IntegerDigits[n], EvenQ[Plus @@ #] &]; Select[Range[300], seqQ] (* Amiram Eldar, Mar 17 2020 *)
  • 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