OFFSET
0,2
COMMENTS
Conjecture: a(n) = least positive whose base-3 up-variation is n; see A297441.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,9,-9)
FORMULA
a(n) = a(n-1) + 9*a(n-2) - 9*a(n-3) for n>2. - Corrected by Colin Barker, Jan 21 2018
G.f.: (1 + 4 x - 3 x^2)/(1 - x - 9 x^2 + 9 x^3).
a(n) = (-1 - (-3)^n + 2*3^(1+n)) / 4. - Colin Barker, Jan 21 2018
MAPLE
seq(-1/4-(-3)^n/4+3*3^n/2, n=0..40); # Robert Israel, Jan 21 2018
MATHEMATICA
LinearRecurrence[{1, 9, -9}, {1, 5, 11}, 40]]
PROG
(PARI) Vec((1 + 4*x - 3*x^2) / ((1 - x)*(1 - 3*x)*(1 + 3*x)) + O(x^40)) \\ Colin Barker, Jan 21 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 21 2018
STATUS
approved