OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..8190
MATHEMATICA
Flatten[Table[FromDigits[#, 10]&/@Tuples[{8, 9}, n], {n, 5}]]
PROG
(Magma) [n: n in [1..35000] | Set(IntegerToSequence(n, 10)) subset {8, 9}];
(PARI) A256341(n)=vector(#n=binary(n+1)[2..-1], i, 10^(#n-i))*n~+10^#n\9*8
(Magma) [n: n in [1..100000] | Set(Intseq(n)) subset {8, 9}]; // Vincenzo Librandi, Aug 19 2016
(Python)
def a(n): return int(bin(n+1)[3:].replace('0', '8').replace('1', '9'))
print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Aug 09 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Mar 27 2015
STATUS
approved