A245288 a(n) = (4*n^2 - 2*n - 1 + (2*n^2 - 2*n + 1)*(-1)^n)/16.
0, 0, 1, 1, 5, 3, 12, 6, 22, 10, 35, 15, 51, 21, 70, 28, 92, 36, 117, 45, 145, 55, 176, 66, 210, 78, 247, 91, 287, 105, 330, 120, 376, 136, 425, 153, 477, 171, 532, 190, 590, 210, 651, 231, 715, 253, 782, 276, 852, 300, 925, 325, 1001, 351, 1080, 378, 1162
Offset: 0
Examples
a(4) = 5; the partitions of 4 into two parts are: (3,1), (2,2). Since 4 is even, we add the largest parts in these partitions to get 5. a(5) = 3; the partitions of 5 into two parts are: (4,1), (3,2). Since 5 is odd, we add the smallest parts in the partitions to get 3.
Links
- Muniru A Asiru, Table of n, a(n) for n = 0..3000 (first 56 terms from Wesley Ivan Hurt)
- Index entries for sequences related to partitions.
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
GAP
a := List([0..10^2],n->(4*n^2-2*n-1+(2*n^2-2*n+1)*(-1)^n)/16); # Muniru A Asiru, Feb 02 2018
-
Magma
[(4*n^2-2*n-1+(2*n^2-2*n+1)*(-1)^n)/16 : n in [0..50]];
-
Maple
A245288:=n->(4*n^2-2*n-1+(2*n^2-2*n+1)*(-1)^n)/16: seq(A245288(n),n=0..50);
-
Mathematica
Table[(4n^2 - 2n - 1 + (2n^2 - 2n + 1) (-1)^n)/16, {n, 0, 50}] (* or *) CoefficientList[Series[x^2 (1 + x + 2*x^2)/(1 - x^2)^3, {x, 0, 50}], x]
-
PARI
concat([0,0], Vec(x^2*(1+x+2*x^2)/(1-x^2)^3 + O(x^100))) \\ Colin Barker, Jul 25 2014
Formula
G.f.: x^2*(1+x+2*x^2)/(1-x^2)^3.
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6), a(0)=a(1)=0, a(2)=a(3)=1, a(4)=5, a(5)=3.
a(n) = (4*n^2 - 2*n - 1 + (2*n^2 - 2*n + 1)*(-1)^n)/16.
a(n) = floor(n/2) * ((1+floor(n/2))*(n mod 2) + (2*n-1-floor(n/2))*((n+1) mod 2))/2.
Sum_{n>=2} 1/a(n) = 2 - Pi/sqrt(3) + 3*log(3). - Amiram Eldar, Aug 25 2022
Comments