OFFSET
0,2
COMMENTS
A174658 corresponds to fixed points.
FORMULA
a(n) = n * A355639(n).
EXAMPLE
For n = 5:
- the first multiple of 5 (alongside their balanced ternary expansions) are:
k k*5 bter(k*5) #1 #T
- --- --------- -- --
1 5 1TT 1 2
2 10 101 2 0
3 15 1TT0 1 2
4 20 1T1T 2 2
- negative and positive trits are first balanced for k = 4,
- so a(5) = 4*5 = 20.
PROG
(PARI) a(n) = { for (k=1, oo, my (m=k*n, s=0, d); while (m, m=(m-d=[0, 1, -1][1+m%3])/3; s+=d); if (s==0, return (k*n))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 11 2022
STATUS
approved