login
A297444
a(n) = a(n-1) + 9*a(n-2) - 9*a(n-3), where a(0) = 1, a(1) = 3, a(2) = 6, a(3) = 33.
2
1, 3, 6, 33, 60, 303, 546, 2733, 4920, 24603, 44286, 221433, 398580, 1992903, 3587226, 17936133, 32285040, 161425203, 290565366, 1452826833, 2615088300, 13075441503, 23535794706, 117678973533, 211822152360, 1059110761803, 1906399371246, 9531996856233
OFFSET
0,2
COMMENTS
Conjecture: a(n) = least positive whose base-3 down-variation is n; see A297441.
FORMULA
a(n) = a(n-1) + 9*a(n-2) - 9*a(n-3), where a(0) = 1, a(1) = 3, a(2) = 6, a(3) = 33.
G.f.: (3 (1 + x))/(1 - x - 9 x^2 + 9 x^3).
a(n) = -3/4 - (-3)^n/4 + 3^n for n>0. - Colin Barker, Jan 21 2018
MATHEMATICA
Join[{1}, LinearRecurrence[{1, 9, -9}, {3, 6, 33}, 40]]
nxt[{a_, b_, c_}]:={b, c, c+9b-9a}; Join[{1}, NestList[nxt, {3, 6, 33}, 30][[;; , 1]]] (* Harvey P. Dale, May 10 2023 *)
PROG
(PARI) Vec((1 + 2*x - 6*x^2 + 9*x^3) / ((1 - x)*(1 - 3*x)*(1 + 3*x)) + O(x^40)) \\ Colin Barker, Jan 21 2018
CROSSREFS
Cf. A297441.
Sequence in context: A124178 A284633 A192166 * A184508 A101142 A298679
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 21 2018
STATUS
approved