OFFSET
1,1
COMMENTS
See A355881 for a general formula.
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..600
Index entries for linear recurrences with constant coefficients, signature (45,-116).
FORMULA
a(n) = A222139(n)/4.
G.f.: x*(4-11*x)/(1-45*x+116*x^2).
a(n) = 45*a(n-1) - 116*a(n-2) with a(1) = 4, a(2) = 169.
a(n) = 2^(-3-n)*((45 - sqrt(1561))^n*(11*sqrt(1561) - 433) + (45 + sqrt(1561))^n*(11*sqrt(1561) + 433))/(29*sqrt(1561)). - Stefano Spezia, Jul 24 2022
EXAMPLE
a(1) = 4, 5 colors 1,2,3,4,5: 121, 123, 124, 125.
The first two colors do not vary.
MATHEMATICA
LinearRecurrence[{45, -116}, {4, 169}, 20] (* Paolo Xausa, Oct 03 2024 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gerhard Kirchner, Jul 24 2022
STATUS
approved