The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
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
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: A295401 A342605 A032398 * A032309 A008519 A243934
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 12:10 EDT 2024. Contains 373105 sequences. (Running on oeis4.)