OFFSET
0,2
COMMENTS
Conjecture: a(n) = least positive whose base-3 total variation is n; see A297440.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,3,-3)
FORMULA
If n = (1 mod 4) or n = (1 mod 4), then a(n) = 3*a(n-2); otherwise, a(n) = 3*a(n-2) + 2.
MATHEMATICA
Join[{1}, LinearRecurrence[{1, 2, -2, 3, -3}, {3, 6, 11, 20, 33}, 40]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 21 2018
STATUS
editing