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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180017 Difference of sums of digits of n in ternary and in binary. 4
0, 0, 1, -1, 1, 1, 0, 0, 3, -1, 0, 0, 0, 0, 1, -1, 3, 3, 0, 0, 2, 0, 1, 1, 2, 2, 3, -3, -1, -1, -2, -2, 3, 1, 2, 2, 0, 0, 1, -1, 2, 2, 1, 1, 3, -1, 0, 0, 2, 2, 3, 1, 3, 3, -2, -2, 1, -1, 0, 0, 0, 0, 1, -3, 3, 3, 2, 2, 4, 2, 3, 3, 2, 2, 3, 1, 3, 3, 2, 2, 6, -2, -1, -1, -1, -1, 0, -2, 1, 1, -2, -2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

COMMENTS

This sequence is positive on average, since 1/log 3 > 1/log 4. Do all integers appear infinitely often? - Charles R Greathouse IV, Feb 07 2013

LINKS

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

FORMULA

a(n) = A053735(n) - A000120(n);

a(A037301(n)) = 0;

a(A000244(n)) = 1 - A000120(A000244(n));

a(A000079(n)) = A053735(A000079(n)) - 1;

a(A024023(n)) = 2*n - A000120(A024023(n)); a(A000225(n)) = A053735(A000225(n)) - n.

MATHEMATICA

Table[Total[IntegerDigits[n, 3]]-Total[IntegerDigits[n, 2]], {n, 0, 100}] (* Harvey P. Dale, Dec 08 2015 *)

CROSSREFS

Cf. A180018, A180019, A007088, A007089.

Sequence in context: A060283 A255851 A078529 * A243827 A059530 A193525

Adjacent sequences:  A180014 A180015 A180016 * A180018 A180019 A180020

KEYWORD

base,sign

AUTHOR

Reinhard Zumkeller, Aug 06 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 19 17:21 EDT 2019. Contains 321330 sequences. (Running on oeis4.)