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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A294286 Sum of the squares of the parts in the partitions of n into two distinct parts. 9
0, 0, 5, 10, 30, 46, 91, 124, 204, 260, 385, 470, 650, 770, 1015, 1176, 1496, 1704, 2109, 2370, 2870, 3190, 3795, 4180, 4900, 5356, 6201, 6734, 7714, 8330, 9455, 10160, 11440, 12240, 13685, 14586, 16206, 17214, 19019, 20140, 22140, 23380, 25585, 26950, 29370 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Iain Fox, Table of n, a(n) for n = 1..10000 (first 1000 terms from Colin Barker)

Index entries for sequences related to partitions

Index entries for linear recurrences with constant coefficients, signature (1,3,-3,-3,3,1,-1).

FORMULA

a(n) = Sum_{i=1..floor((n-1)/2)} i^2 + (n-i)^2.

From David A. Corneth, Oct 27 2017: (Start)

For odd n, a(n) = n^3/3 - n^2/2 + n/6 = A000330(n + 1).

For even n, a(n) = n^3/3 - 3*n^2/4 + n/6.

(End)

From Colin Barker, Nov 04 2017: (Start)

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

a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n > 7.

(End)

EXAMPLE

For n = 6, there are two ways of partitioning 6 into two distinct parts: 6 = 1+5 and 6 = 2+4.  So a(6) = 1^2 + 5^2 + 2^2 + 4^2 = 46.

For n = 7, there are three ways of partitioning 7 into two distinct parts: 7 = 1+6, 7 = 2+5, and 7 = 3+4.  So a(7) = 1^2 + 6^2 + 2^2 + 5^2 + 3^2 + 4^2 = 91. - Michael B. Porter, Nov 05 2017

MATHEMATICA

Table[Sum[i^2 + (n - i)^2, {i, Floor[(n-1)/2]}], {n, 40}]

PROG

(PARI) first(n) = my(res = vector(n, i, i^3 / 3 - i^2 / 2 + i / 6)); forstep(i = 2, n, 2, res[i] -= i^2 >> 2); res \\ David A. Corneth, Oct 27 2017

(PARI) concat(vector(2), Vec(x^3*(5 + 5*x + 5*x^2 + x^3) / ((1 - x)^4*(1 + x)^3) + O(x^60))) \\ Colin Barker, Nov 04 2017

CROSSREFS

Cf. A000330.

Sequence in context: A005514 A069921 A053818 * A133629 A156302 A156234

Adjacent sequences:  A294283 A294284 A294285 * A294287 A294288 A294289

KEYWORD

nonn,easy

AUTHOR

Wesley Ivan Hurt, Oct 26 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 08:05 EDT 2021. Contains 347556 sequences. (Running on oeis4.)