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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174658 Balanced ternary numbers with equal count of negative trits and positive trits. 6
0, 2, 6, 8, 16, 18, 20, 24, 26, 32, 46, 48, 52, 54, 56, 60, 62, 70, 72, 74, 78, 80, 86, 96, 98, 104, 130, 136, 138, 142, 144, 146, 154, 156, 160, 162, 164, 168, 170, 178, 180, 182, 186, 188, 194, 208, 210, 214, 216, 218, 222, 224, 232, 234, 236, 240, 242, 248, 258 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Numbers for which the sum of trits is zero.

LINKS

Daniel Forgues, Table of n, a(n) for n=1..14309

MATHEMATICA

(* First run the program for A065363 to define balTernDigits *) A174658 = Select[Range[0, 299], Plus@@balTernDigits[#] == 0 &] (* Alonso del Arte, Feb 24 2011 *)

PROG

(Python)

def a(n):

    s=0

    x=0

    while n>0:

        x=n%3

        n=n/3

        if x==2:

            x=-1

            n+=1

        s+=x

    return s

print [n for n in xrange(301) if a(n)==0] # Indranil Ghosh, Jun 07 2017

CROSSREFS

Cf. A174657, A174659, A065363, A140267, A257869.

Sequence in context: A049818 A066189 A278834 * A266074 A191822 A238549

Adjacent sequences:  A174655 A174656 A174657 * A174659 A174660 A174661

KEYWORD

base,nonn

AUTHOR

Daniel Forgues, Mar 26 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 18 19:06 EST 2017. Contains 294894 sequences.