A307018 Total number of parts of size 3 in the partitions of n into parts of size 2 and 3.
0, 0, 0, 1, 0, 1, 2, 1, 2, 4, 2, 4, 6, 4, 6, 9, 6, 9, 12, 9, 12, 16, 12, 16, 20, 16, 20, 25, 20, 25, 30, 25, 30, 36, 30, 36, 42, 36, 42, 49, 42, 49, 56, 49, 56, 64, 56, 64, 72, 64, 72, 81, 72, 81, 90, 81, 90, 100, 90, 100, 110, 100, 110, 121, 110, 121, 132
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1,2,0,-2,-1,0,1).
Programs
-
GAP
a:=[0,0,0,1,0,1,2,1];; for n in [9..80] do a[n]:=a[n-2]+2*a[n-3] -2*a[n-5]-a[n-6]+a[n-8]; od; a; # G. C. Greubel, Apr 03 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 80); [0,0,0] cat Coefficients(R!( x^3/((1-x^2)*(1-x^3)^2) )); // G. C. Greubel, Apr 03 2019 -
Mathematica
LinearRecurrence[{0,1,2,0,-2,-1,0,1}, {0,0,0,1,0,1,2,1}, 80] (* G. C. Greubel, Apr 03 2019 *) Table[(6n(2+n)-5-27(-1)^n+8(4+3n)Cos[2n Pi/3]-8Sqrt[3]n Sin[2n Pi/3])/216,{n,0,66}] (* Stefano Spezia, Apr 21 2022 *)
-
PARI
my(x='x+O('x^80)); concat([0,0,0], Vec(x^3/((1-x^2)*(1-x^3)^2))) \\ G. C. Greubel, Apr 03 2019
-
Sage
(x^3/((1-x^2)*(1-x^3)^2)).series(x, 80).coefficients(x, sparse=False) # G. C. Greubel, Apr 03 2019
Formula
a(3n+1) = A002620(n+2).
a(3n+2) = A002620(n+1).
a(3n+3) = A002620(n+2).
G.f.: x^3/((1+x)*(1+x+x^2)^2*(1-x)^3). - Alois P. Heinz, Mar 19 2019
a(n) = a(n-2) + 2*a(n-3) - 2*a(n-5) - a(n-6) + a(n-8). - G. C. Greubel, Apr 03 2019
a(n) = (6*n*(2 + n) + 8*(4 + 3*n)*cos(2*n*Pi/3) - 8*sqrt(3)*n*sin(2*n*Pi/3) - 5 - 27*(-1)^n)/216. - Stefano Spezia, Apr 21 2022
From Ridouane Oudra, Nov 24 2024: (Start)
a(n) = (7*n/2 - 7*n^2/2 - 9*floor(n/2) + (6*n+4)*floor(2*n/3) + 4*floor(n/3))/18.
Extensions
More terms from Alois P. Heinz, Mar 19 2019
Comments