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.
%I A347111 #19 Oct 02 2021 08:13:18 %S A347111 0,8,1,89,89,90,90,978,901,909,909,990,990,998,991,9879,9879,9810, %T A347111 9810,9898,9891,9899,9899,10780,10780,10788,10011,10099,10099,10100, %U A347111 10100,98988,98981,98989,98989,99000,99000,99008,99001,99889,99889,99890,99890,99978 %N A347111 a(n) is n in binary rendered as a base-10 number minus n in ternary rendered as a base-10 number. %C A347111 Theorem: a(6k - 2) = a(6k - 1), a(6k) = a(6k + 1), and a(6k + 2) != a(6k + 3) for all positive integers k. %C A347111 Proof: a(6k - 2) in binary has a last digit of 0 and in ternary has a last digit of 1. a(6k - 1) is unchanged in both binary and ternary except for the last digit, which is increased by one in both bases. Since the 0 becomes a 1 in the binary number, which is a valid digit in binary, and the 1 becomes a 2 in the ternary number, which is a valid digit in ternary, the base-10 difference between the two numbers is the same. %C A347111 The proof of the equality of a(6k) and a(6k + 1) is essentially the same; the binary and ternary numbers have last digits of 0, and those numbers plus 1 have last digits of 1; therefore the difference is the same. %C A347111 In the last part of the theorem, a(6k + 2) != a(6k + 3), the binary number will increase by 1 when rendered in base 10. However, the ternary number's second to last digit will change because the last digit goes from 2 to 0. This means that there is an increase in the number not equal to one. Therefore the differences are different. %C A347111 Theorem: a(n) contains only the digits 0, 1, 7, 8, and 9. %C A347111 Proof: When we subtract the numbers in base 10, the possible digits of the difference are all of the possible combinations of the digits, including borrowed digits. With the number subtracted from being a number in binary and the number that is subtracted being a number in ternary, we can get the digits 0, 1, 7, 8, and 9 (with borrowing), and no other digits. %F A347111 a(n) = A007088(n) - A007089(n). %e A347111 a(7) = 111 (7 in binary) - 21 (7 in ternary) = 90. %t A347111 Array[Subtract @@ Map[FromDigits, IntegerDigits[#, {2, 3}]] &, 44] (* _Michael De Vlieger_, Aug 18 2021 *) %o A347111 (PARI) a(n) = fromdigits(digits(n, 2)) - fromdigits(digits(n, 3)); \\ _Michel Marcus_, Aug 19 2021 %Y A347111 Cf. A007088, A007089. %K A347111 base,nonn %O A347111 1,2 %A A347111 _Atticus Stewart_, Aug 17 2021