A284381 Numbers k with digits 5 and 8 only.
5, 8, 55, 58, 85, 88, 555, 558, 585, 588, 855, 858, 885, 888, 5555, 5558, 5585, 5588, 5855, 5858, 5885, 5888, 8555, 8558, 8585, 8588, 8855, 8858, 8885, 8888, 55555, 55558, 55585, 55588, 55855, 55858, 55885, 55888, 58555, 58558, 58585, 58588, 58855, 58858
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Magma
[n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {5, 8}];
-
Mathematica
Join @@ ((FromDigits /@ Tuples[{5, 8}, #]) & /@ Range@ 5) (* Giovanni Resta, Mar 28 2017 *)
-
Python
def a(n): return int(bin(n+1)[3:].replace('0', '5').replace('1', '8')) print([a(n) for n in range(1, 45)]) # Michael S. Branicky, May 08 2021
Comments