cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A245288 a(n) = (4*n^2 - 2*n - 1 + (2*n^2 - 2*n + 1)*(-1)^n)/16.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jul 23 2014

Keywords

Comments

For even n, the sequence gives the sum of the largest parts of the partitions of n into two parts. For odd n, the sequence gives the sum of the smallest parts of the partitions of n into two parts (see example).

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.
		

Crossrefs

Cf. A245467, A000326 (bisection), A000217 (bisection).

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
a(2n) = A000326(n), a(2n+1) = A000217(n). - Wesley Ivan Hurt, Sep 05 2022