login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300222 In ternary (base-3) representation of n, replace 1's with 0's. 5
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..59048

FORMULA

a(n) = n - A244042(n) = 2*A244042(A004488(n)).

a(n) = 2*A005836(1+A289814(n)). [With the current starting offset 1 of A005836.]

a(n) = A300822(n) + A300824(n).

EXAMPLE

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.

MATHEMATICA

Array[FromDigits[IntegerDigits[#, 3] /. 1 -> 0, 3] &, 93, 0] (* Michael De Vlieger, Mar 17 2018 *)

PROG

(PARI)

A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);

A300222(n) = (n - A244042(n));

\\ Or directly as:

A300222(n) = fromdigits(apply(x->(if (1==x, 0, x)), digits(n, 3)), 3);

CROSSREFS

Cf. A004488, A005836, A007089, A244042, A289814.

Cf. A300822 (Moebius transform).

Sequence in context: A200728 A066209 A284455 * A246814 A116597 A202496

Adjacent sequences:  A300219 A300220 A300221 * A300223 A300224 A300225

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Mar 14 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 7 00:46 EST 2019. Contains 329819 sequences. (Running on oeis4.)