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!)
A174658 Balanced ternary numbers with equal count of negative trits and positive trits. 8

%I

%S 0,2,6,8,16,18,20,24,26,32,46,48,52,54,56,60,62,70,72,74,78,80,86,96,

%T 98,104,130,136,138,142,144,146,154,156,160,162,164,168,170,178,180,

%U 182,186,188,194,208,210,214,216,218,222,224,232,234,236,240,242,248,258

%N Balanced ternary numbers with equal count of negative trits and positive trits.

%C Numbers for which the sum of trits is zero.

%H Daniel Forgues, <a href="/A174658/b174658.txt">Table of n, a(n) for n=1..14309</a>

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

%o (Python)

%o def a(n):

%o s=0

%o x=0

%o while n>0:

%o x=n%3

%o n //= 3

%o if x==2:

%o x=-1

%o n+=1

%o s+=x

%o return s

%o print([n for n in range(301) if a(n)==0]) # _Indranil Ghosh_, Jun 07 2017

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

%K base,nonn

%O 1,2

%A _Daniel Forgues_, Mar 26 2010

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 June 20 07:51 EDT 2021. Contains 345162 sequences. (Running on oeis4.)