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.

A284380 Numbers k with digits 5 and 7 only.

Original entry on oeis.org

5, 7, 55, 57, 75, 77, 555, 557, 575, 577, 755, 757, 775, 777, 5555, 5557, 5575, 5577, 5755, 5757, 5775, 5777, 7555, 7557, 7575, 7577, 7755, 7757, 7775, 7777, 55555, 55557, 55575, 55577, 55755, 55757, 55775, 55777, 57555, 57557, 57575, 57577, 57755, 57757
Offset: 1

Views

Author

Jaroslav Krizek, Mar 28 2017

Keywords

Crossrefs

Prime terms are in A020467.
Numbers n with digits 5 and k only for k = 0 - 4 and 6 - 9: A169964 (k = 0), A276037 (k = 1), A072961 (k = 2), A284379 (k = 3), A256290 (k = 4), A256291 (k = 6), this sequence (k = 7), A284381 (k = 8), A284382 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 7}];
    
  • Mathematica
    Join @@ ((FromDigits /@ Tuples[{5, 7}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
  • Python
    from sympy.utilities.iterables import multiset_permutations
    def aupton(terms):
      n, digits, alst = 0, 1, []
      while len(alst) < terms:
        mpstr = "".join(d*digits for d in "57")
        for mp in multiset_permutations(mpstr, digits):
          alst.append(int("".join(mp)))
          if len(alst) == terms: break
        else: digits += 1
      return alst
    print(aupton(44)) # Michael S. Branicky, May 07 2021