login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A171960 Values of the 2-complement of n in ternary representation. 7
2, 1, 0, 5, 4, 3, 2, 1, 0, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

a(A134026(n)) < A134026(n);

a(A003462(n)) = A003462(n);

a(A134025(n)) >= A134025(n).

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

FORMULA

a(n) = if n<3 then 2 - n else 3*a(floor(n/3)) + 2 - n mod 3.

PROG

(PARI) a(n) = 3^(if(n, logint(n, 3))+1) - 1 - n; \\ Kevin Ryde, Jul 16 2020

CROSSREFS

Cf. A007089, A035327, A061601.

Sequence in context: A113368 A066435 A261301 * A330396 A182376 A030206

Adjacent sequences:  A171957 A171958 A171959 * A171961 A171962 A171963

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Jan 20 2010

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 March 8 13:14 EST 2021. Contains 341948 sequences. (Running on oeis4.)