|
|
A174657
|
|
Balanced ternary numbers with more negative trits than positive trits.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Numbers for which the sum of trits is negative.
|
|
LINKS
|
|
|
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 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|