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!)
 A245764 a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n). 2
 2, 4, 14, 20, 42, 52, 86, 100, 146, 164, 222, 244, 314, 340, 422, 452, 546, 580, 686, 724, 842, 884, 1014, 1060, 1202, 1252, 1406, 1460, 1626, 1684, 1862, 1924, 2114, 2180, 2382, 2452, 2666, 2740, 2966, 3044, 3282, 3364, 3614, 3700, 3962, 4052, 4326, 4420 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS Sum of the parts in the partitions of 2n+2 and 2n-2 into two odd parts. LINKS Michael De Vlieger, Table of n, a(n) for n = 0..10000 Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1). FORMULA G.f.: 2*(1 + x^2)*(1 + x + 2 x^2)/((1 - x)^3*(1 + x)^2). Recurrence: a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n>4. a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n). a(n) = (2n + 2)*ceiling((n + 1)/2) + (2n - 2)*ceiling((n - 1)/2). EXAMPLE a(0) = 2; There are no partitions of 2(0)-2 = -2, and the odd partitions of 2(0)+2 = 2 into two odd parts is (1,1). The sum of these parts is 2. a(2) = 14; The partitions of 2(2)-2 = 2 into two odd parts is (1,1) and the partitions of 2(2)+2 = 6 into two odd parts is (5,1) and (3,3).  The sum of the parts in these partitions is 1 + 1 + 5 + 1 + 3 + 3 = 14. MAPLE A245764:=n->2*(n^2 + 1) + n*(1 + (-1)^n): seq(A245764(n), n=0..50); MATHEMATICA Table[2n^2 + n + 2 + n(-1)^n, {n, 0, 50}] CoefficientList[Series[2 (1 + x^2) (1 + x + 2 x^2)/((1 - x)^3 (1 + x)^2), {x, 0, 50}], x] PROG (MAGMA) [2*(n^2 + 1) + n*(1 + (-1)^n) : n in [0..50]]; (PARI) vector(100, n, 2*((n-1)^2 + 1) + (n-1)*(1 - (-1)^n)) \\ Derek Orr, Jul 31 2014 (GAP) List([0..10^3], n->2*(n^2+1)+n*(1+(-1)^n)); # Muniru A Asiru, Feb 04 2018 CROSSREFS Cf. A245766. Sequence in context: A299488 A295401 A032398 * A032309 A008519 A243934 Adjacent sequences:  A245761 A245762 A245763 * A245765 A245766 A245767 KEYWORD nonn,easy AUTHOR Wesley Ivan Hurt, Jul 31 2014 STATUS approved

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 19 17:59 EST 2020. Contains 331051 sequences. (Running on oeis4.)