The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A245766 a(n) = 2*(n^2 + 1) - n*(1 + (-1)^n). 2

%I

%S 2,4,6,20,26,52,62,100,114,164,182,244,266,340,366,452,482,580,614,

%T 724,762,884,926,1060,1106,1252,1302,1460,1514,1684,1742,1924,1986,

%U 2180,2246,2452,2522,2740,2814,3044,3122,3364,3446,3700,3786,4052,4142,4420

%N a(n) = 2*(n^2 + 1) - n*(1 + (-1)^n).

%C Sum of the parts in the partitions of 2*n-2 and 2*n+2 into two even parts, for n>0 (see example).

%H Michael De Vlieger, <a href="/A245766/b245766.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Par#part">Index entries for sequences related to partitions</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).

%F G.f.: 2*(1 + x*(1 + x*(-1 + x*(5 + 2*x)))) / ((1 - x)^3*(1 + x)^2).

%F a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4.

%F a(n) = (2n + 2)*floor((n + 1)/2) + (2n - 2)*floor((n - 1)/2).

%e a(1) = 4; there is no partition for 2(1)-2 = 0, and for 2(1)+2 = 4, there is one partition into two even parts (2,2). The sum of these parts = 4.

%e a(3) = 20; 2(3)-2 = 4 has one partition with two even parts (2,2). Also, 2(3)+2 = 8 has two partitions with two even parts: (6,2) and (4,4). The sum total of the parts in these partitions is 2 + 2 + 6 + 2 + 4 + 4 = 20.

%p A245766:=n->2*(n^2+1) - n*(1+(-1)^n): seq(A245766(n), n=0..50);

%t Table[2 (n^2 + 1) - n (1 + (-1)^n), {n, 0, 50}]

%t CoefficientList[Series[2 (1 + x (1 + x (-1 + x (5 + 2 x))))/((1 - x)^3 (1 + x)^2), {x, 0, 50}], x]

%o (MAGMA) [2*(n^2+1)-n*(1+(-1)^n): n in [0..50]];

%o (PARI) vector(150, n, 2*((n-1)^2+1)-(n-1)*(1-(-1)^n)) \\ _Derek Orr_, Jul 31 2014

%Y Cf. A245764.

%K nonn,easy

%O 0,1

%A _Wesley Ivan Hurt_, Jul 31 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 20 05:47 EST 2020. Contains 331067 sequences. (Running on oeis4.)