OFFSET
1,4
LINKS
T. Mansour and M. Shattuck, Counting Peaks and Valleys in a Partition of a Set, J. Int. Seq. 13 (2010), 10.6.8, Table 1.
Index entries for linear recurrences with constant coefficients, signature (6,-15,24,-29,25,-17,9,-3,1).
FORMULA
From Colin Barker, Nov 07 2017: (Start)
G.f.: x^3*(1 - x + x^2)*(1 - 2*x + 3*x^2 - x^3 + x^4) / ((1 - x)*(1 - 2*x + x^2 - x^3)*(1 - 3*x + 3*x^2 - 4*x^3 + x^4 - x^5)).
a(n) = 6*a(n-1) - 15*a(n-2) + 24*a(n-3) - 29*a(n-4) + 25*a(n-5) - 17*a(n-6) + 9*a(n-7) - 3*a(n-8) + a(n-9) for n>9.
(End)
MAPLE
with(orthopoly) :
nmax := 10:
tpr := 1+x^2/2 :
k := 3:
g := x^k ;
for j from 1 to k do
if j> 1 then
g := g*( U(j-1, tpr)-(1+x)*U(j-2, tpr)) / ((1-x)*U(j-1, tpr)-U(j-2, tpr)) ;
else
# note that U(-1, .)=0, U(0, .)=1
g := g* U(j-1, tpr) / ((1-x)*U(j-1, tpr)) ;
end if;
end do:
simplify(%) ;
taylor(g, x=0, nmax+1) ;
gfun[seriestolist](%) ; # R. J. Mathar, Mar 11 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Jul 09 2017
STATUS
approved