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.

A284382 Numbers k with digits 5 and 9 only.

Original entry on oeis.org

5, 9, 55, 59, 95, 99, 555, 559, 595, 599, 955, 959, 995, 999, 5555, 5559, 5595, 5599, 5955, 5959, 5995, 5999, 9555, 9559, 9595, 9599, 9955, 9959, 9995, 9999, 55555, 55559, 55595, 55599, 55955, 55959, 55995, 55999, 59555, 59559, 59595, 59599, 59955, 59959
Offset: 1

Views

Author

Jaroslav Krizek, Mar 28 2017

Keywords

Comments

Prime terms are in A020468.

Crossrefs

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), A284380 (k = 7), A284381 (k = 8), this sequence (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 9}];
    
  • Mathematica
    Join @@ ((FromDigits /@ Tuples[{5, 9}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '9'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 09 2021