A369842 Number of compositions of 5*n-1 into parts 2 and 5.
1, 3, 7, 18, 52, 154, 450, 1301, 3753, 10838, 31327, 90568, 261813, 756786, 2187496, 6323023, 18277014, 52830706, 152709940, 441415867, 1275934888, 3688154521, 10660798289, 30815580241, 89074003241, 257472939209, 744238632362, 2151259638423, 6218325456983
Offset: 1
Links
- Paolo Xausa, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-9,10,-5,1).
Programs
-
Mathematica
LinearRecurrence[{5, -9, 10, -5, 1}, {1, 3, 7, 18, 52}, 50] (* Paolo Xausa, Mar 15 2024 *)
-
PARI
a(n) = sum(k=0, n\2, binomial(n+1+3*k, n-1-2*k));
Formula
a(n) = A001687(5*n).
a(n) = Sum_{k=0..floor(n/2)} binomial(n+1+3*k,n-1-2*k).
a(n) = 5*a(n-1) - 9*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: x*(1-x)^2/((1-x)^5 - x^2).