A060961 Number of compositions (ordered partitions) of n into 1's, 3's and 5's.
1, 1, 1, 2, 3, 5, 8, 12, 19, 30, 47, 74, 116, 182, 286, 449, 705, 1107, 1738, 2729, 4285, 6728, 10564, 16587, 26044, 40893, 64208, 100816, 158296, 248548, 390257, 612761, 962125, 1510678, 2371987, 3724369, 5847808, 9181920, 14416967, 22636762, 35543051
Offset: 0
Links
- Harry J. Smith, Table of n, a(n) for n = 0..500
- Sergey Dovgal and Sergey Kirgizov, Structure and growth of R-bonacci words, arXiv:2310.01213 [math.CO], 2023. See p. 5.
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,0,1).
Crossrefs
Programs
-
Mathematica
CoefficientList[Series[ 1 /(1 - z - z^3 - z^5), {z, 0, 100}], z] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *) LinearRecurrence[{1,0,1,0,1},{1,1,1,2,3},50] (* Harvey P. Dale, Apr 21 2022 *)
-
Maxima
a(n):=sum((sum(binomial(j,3*n-5*m+2*j)*binomial(2*m-n,j),j,0,2*m-n)),m,floor((n+1)/2),n); /* Vladimir Kruchinin, Mar 11 2013 */
-
PARI
my(N=66, x='x+O('x^N)); Vec(1/(1-x-x^3-x^5)) \\ Joerg Arndt, Oct 21 2012
Formula
a(n) = a(n-1) + a(n-3) + a(n-5).
G.f.: 1 / (1-(x+x^3+x^5)).
a(n) = Sum_{m=floor((n+1)/2)..n} Sum_{j=0..2*m-n} binomial(j,3*n-5*m+2*j)*binomial(2*m-n,j). - Vladimir Kruchinin, Mar 11 2013
Extensions
a(0)=1 prepended by Joerg Arndt, Oct 21 2012
Comments