OFFSET
1,2
COMMENTS
Numbers for which the sum of trits is positive.
LINKS
Daniel Forgues, Table of n, a(n) for n=1..53007
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
Daniel Forgues, Mar 26 2010
STATUS
approved