OFFSET
1,1
COMMENTS
See A355881 for a general formula.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..800
Index entries for linear recurrences with constant coefficients, signature (18,-27).
FORMULA
G.f.: x*(3-5*x)/(1-18*x+27*x^2).
a(n) = 18*a(n-1) - 27*a(n-2) with a(1) = 3, a(2) = 49.
a(n) = 3^(n-7/2)*((12 + 5*sqrt(6))*(3 + sqrt(6))^n - (3 - sqrt(6))^n*(12 - 5*sqrt(6))/(2*sqrt(2)). - Stefano Spezia, Jul 24 2022
a(n) = 2*A198710(n) - 1. - Hugo Pfoertner, Jul 24 2022
EXAMPLE
a(1) = 3, 4 colors 1,2,3,4: 121, 123, 124.
The first two colors do not vary.
MATHEMATICA
LinearRecurrence[{18, -27}, {3, 49}, 20] (* Paolo Xausa, Oct 03 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gerhard Kirchner, Jul 24 2022
STATUS
approved