OFFSET
0,6
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..9841
FORMULA
a(n) = 0 iff n belongs to A350776.
EXAMPLE
The first terms, in decimal and in balanced ternary, are:
n a(n) bter(n) bter(a(n))
-- ---- ------- ----------
0 0 0 0
1 0 1 0
2 -1 1T T
3 0 10 0
4 1 11 1
5 -2 1TT T1
6 -3 1T0 T0
7 -4 1T1 TT
8 0 10T 0
9 0 100 0
10 0 101 0
11 2 11T 1T
12 3 110 10
13 4 111 11
PROG
(PARI) a(n) = { my (v=0, p=0, d); for (x=-1, oo, if (n==0, return (v), d=[0, 1, -1][1+n%3]; v+=p*d*3^x; n=(n-d)/3; p=d)) }
CROSSREFS
KEYWORD
sign,base
AUTHOR
Rémy Sigrist, Jan 15 2022
STATUS
approved