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.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - 3*a(n-5), where a(0) = 1, a(1) = 3, a(2) = 6, a(3) = 11, a(4) = 20, a(5) = 33.
G.f.: (1 + 2*x + x^2 + x^3 - 3*x^5) / ((1 - x)*(1 + x^2)*(1 - 3*x^2)). - Corrected by Colin Barker, Jan 21 2018
MATHEMATICA
Join[{1}, LinearRecurrence[{1, 2, -2, 3, -3}, {3, 6, 11, 20, 33}, 40]]
PROG
(PARI) Vec((1 + 2*x + x^2 + x^3 - 3*x^5) / ((1 - x)*(1 + x^2)*(1 - 3*x^2)) + O(x^40)) \\ Colin Barker, Jan 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 21 2018
STATUS
proposed