A174657 Balanced ternary numbers with more negative trits than positive trits.
5, 14, 15, 17, 23, 41, 42, 43, 44, 45, 47, 50, 51, 53, 59, 68, 69, 71, 77, 95, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 134, 135, 137, 140, 141, 143, 149, 150, 151, 152, 153, 155, 158, 159, 161, 167, 176, 177, 179, 185, 203, 204, 205, 206, 207, 209
Offset: 1
Links
- Daniel Forgues, Table of n, a(n) for n=1..32685
Programs
-
Mathematica
(* First run the program for A065363 to define balTernDigits *) Select[Range[210], Count[balTernDigits[#], -1] > Count[balTernDigits[#], 1] &] (* Alonso del Arte, Feb 26 2011 *)
-
Python
def a(n): s=0 x=0 while n>0: x=n%3 n//=3 if x==2: x=-1 n+=1 s+=x return s print([n for n in range(301) if a(n)<0]) # Indranil Ghosh, Jun 07 2017
Comments