|
| |
|
|
A108964
|
|
Write n in balanced ternary notation, omit any zeros and form the left-to-right alternating sum mod 3.
|
|
0
| |
|
|
0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 1, 0, 2, 1, 2, 0, 2, 1, 0
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,3
|
|
|
COMMENTS
| This sequence and A036581 are squarefree (they do not contain any substring XX).
|
|
|
EXAMPLE
| 1="1", so a(1)=1; 2=3-1="1,-1", so a(2)=2; 3=3="1,0", so a(3)=1; 4=3+1="1,1", so a(4)=0; ...
|
|
|
CROSSREFS
| Cf. A036581.
Sequence in context: A141581 A179286 A193690 * A036581 A135055 A035148
Adjacent sequences: A108961 A108962 A108963 * A108965 A108966 A108967
|
|
|
KEYWORD
| nonn,more
|
|
|
AUTHOR
| R. William Gosper (rwg(AT)osots.com), Jul 22 2005
|
| |
|
|