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.

A029741 Even numbers with distinct digits.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 90, 92, 94, 96, 98, 102, 104, 106, 108, 120, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 146
Offset: 1

Views

Author

Keywords

Comments

Largest term is 9876543210. - Alonso del Arte, Jan 09 2020
There are 4493646 terms. - Michael S. Branicky, Aug 04 2022

Crossrefs

Cf. A029740 (odd version). Union of that sequence with this sequence gives A010784.

Programs

  • Mathematica
    Select[2Range[0, 79], Max[DigitCount[#]] == 1 &] (* Harvey P. Dale, Dec 23 2013 *)
  • Python
    # generates full sequence
    from itertools import permutations
    afull = [0] + sorted(set(int("".join(p)) for d in range(1, 11) for p in permutations("0123456789", d) if p[0] != "0" and p[-1] in "02468"))
    print(afull[:100]) # Michael S. Branicky, Aug 04 2022
  • Scala
    def hasDistinctDigits(n: Int): Boolean = {
      val numerStr = n.toString
      val digitSet = numerStr.split("").toSet
      numerStr.length == digitSet.size
    }
    (0 to 198 by 2).filter(hasDistinctDigits) // Alonso del Arte, Jan 09 2020
    

Extensions

Offset changed to 1 by Michael S. Branicky, Aug 04 2022