OFFSET
0,3
COMMENTS
Conjecture: a(n) is the total number of pairs of adjacent parts that are the same color in all n-color compositions of n+1. - John Tyler Rascoe, Jul 30 2024
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (5,-5,-5,5,-1).
FORMULA
a(n) = F(n+1)*((n+2)*F(n) + (n)*F(n+2))/5 where F(n) = A000045(n) is the Fibonacci numbers.
G.f.: x*(1-x)/((1+x)*(1-3*x+x^2)^2).
MAPLE
a := proc(n) option remember; if n < 3 then return n^2 fi;
-((2 - 2*n^2 + n)*a(n - 1) + (1 - 2*n^2 + 3*n)*a(n - 2) + n^2*a(n - 3))/(n - 1)^2 end: seq(a(n), n = 0..29); # Peter Luschny, Apr 16 2024
MATHEMATICA
CoefficientList[Series[x(1-x)/((1+x)*(1-3*x+x^2)^2), {x, 0, 29}], x] (* Stefano Spezia, Apr 16 2024 *)
PROG
(PARI)
A_x(N)= {my(x='x+O('x^N)); concat([0], Vec(x*(1-x)/((1+x)*(1-3*x+x^2)^2)))}
A_x(40) \\ John Tyler Rascoe, Jul 29 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Kruchinin, Apr 15 2024
STATUS
approved