cp's OEIS Frontend

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.

A300222 In ternary (base-3) representation of n, replace 1's with 0's.

This page as a plain text file.
%I A300222 #13 Mar 19 2018 22:13:51
%S A300222 0,0,2,0,0,2,6,6,8,0,0,2,0,0,2,6,6,8,18,18,20,18,18,20,24,24,26,0,0,2,
%T A300222 0,0,2,6,6,8,0,0,2,0,0,2,6,6,8,18,18,20,18,18,20,24,24,26,54,54,56,54,
%U A300222 54,56,60,60,62,54,54,56,54,54,56,60,60,62,72,72,74,72,72,74,78,78,80,0,0,2,0,0,2,6,6,8,0,0,2
%N A300222 In ternary (base-3) representation of n, replace 1's with 0's.
%H A300222 Antti Karttunen, <a href="/A300222/b300222.txt">Table of n, a(n) for n = 0..59048</a>
%F A300222 a(n) = n - A244042(n) = 2*A244042(A004488(n)).
%F A300222 a(n) = 2*A005836(1+A289814(n)). [With the current starting offset 1 of A005836.]
%F A300222 a(n) = A300822(n) + A300824(n).
%e A300222 For n=46, which in base-3 (A007089) is 1201, replacing 1's with 0's gives 200, and as that is base-3 representation of 18 (= 2*(3^2) + 0*(3^1) + 0*(3^0)), a(46) = 18.
%t A300222 Array[FromDigits[IntegerDigits[#, 3] /. 1 -> 0, 3] &, 93, 0] (* _Michael De Vlieger_, Mar 17 2018 *)
%o A300222 (PARI)
%o A300222 A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);
%o A300222 A300222(n) = (n - A244042(n));
%o A300222 \\ Or directly as:
%o A300222 A300222(n) = fromdigits(apply(x->(if (1==x, 0, x)), digits(n, 3)), 3);
%Y A300222 Cf. A004488, A005836, A007089, A244042, A289814.
%Y A300222 Cf. A300822 (Moebius transform).
%K A300222 nonn,base
%O A300222 0,3
%A A300222 _Antti Karttunen_, Mar 14 2018