A347111 a(n) is n in binary rendered as a base-10 number minus n in ternary rendered as a base-10 number.
0, 8, 1, 89, 89, 90, 90, 978, 901, 909, 909, 990, 990, 998, 991, 9879, 9879, 9810, 9810, 9898, 9891, 9899, 9899, 10780, 10780, 10788, 10011, 10099, 10099, 10100, 10100, 98988, 98981, 98989, 98989, 99000, 99000, 99008, 99001, 99889, 99889, 99890, 99890, 99978
Offset: 1
Examples
a(7) = 111 (7 in binary) - 21 (7 in ternary) = 90.
Programs
-
Mathematica
Array[Subtract @@ Map[FromDigits, IntegerDigits[#, {2, 3}]] &, 44] (* Michael De Vlieger, Aug 18 2021 *)
-
PARI
a(n) = fromdigits(digits(n, 2)) - fromdigits(digits(n, 3)); \\ Michel Marcus, Aug 19 2021
Comments