OFFSET
1,7
COMMENTS
Zeros occur at A008776, or 2*3^(k-1), k > 0.
FORMULA
MATHEMATICA
a[1] = 1; a[n_] := Switch[ Mod[n, 3], 0, a[n/3], 1, (n - 1)/3, 2, (n - 2)/3]; Array[a, 90]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, May 23 2006
STATUS
approved