A213084 Numbers consisting of ones and eights.
1, 8, 11, 18, 81, 88, 111, 118, 181, 188, 811, 818, 881, 888, 1111, 1118, 1181, 1188, 1811, 1818, 1881, 1888, 8111, 8118, 8181, 8188, 8811, 8818, 8881, 8888, 11111, 11118, 11181, 11188, 11811, 11818, 11881, 11888, 18111, 18118, 18181, 18188, 18811, 18818
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..16382
Crossrefs
Programs
-
Mathematica
Flatten[Table[FromDigits/@Tuples[{1,8},n],{n,5}]] (* Harvey P. Dale, Aug 27 2014 *)
-
PARI
is(n) = #setintersect(vecsort(digits(n), , 8), [0, 2, 3, 4, 5, 6, 7, 9])==0 \\ Felix Fröhlich, Sep 09 2019
-
Python
res = [] i = 0 while len (res) < 260: for c in str(i): if c in '18': continue else: break else: res.append(i) i = i + 1 print(res)
-
Python
def a(n): return int(bin(n+1)[3:].replace('1', '8').replace('0', '1')) print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jun 26 2025
Comments