login
Sum of the squared parts of the partitions of n into exactly two parts.
2

%I #24 Jun 22 2024 10:08:10

%S 0,2,5,18,30,64,91,156,204,310,385,542,650,868,1015,1304,1496,1866,

%T 2109,2570,2870,3432,3795,4468,4900,5694,6201,7126,7714,8780,9455,

%U 10672,11440,12818,13685,15234,16206,17936,19019,20940,22140,24262,25585,27918,29370,31924,33511

%N Sum of the squared parts of the partitions of n into exactly two parts.

%H Michael De Vlieger, <a href="/A226141/b226141.txt">Table of n, a(n) for n = 1..10000</a>

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

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

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

%F a(n) = n*(8*n^2 - 9*n + 4)/24 + (-1)^n*n^2/8. - _Giovanni Resta_, May 29 2013

%F G.f.: x^2*(2+3*x+7*x^2+3*x^3+x^4) / ( (1+x)^3*(x-1)^4 ). - _R. J. Mathar_, Jun 07 2013

%F 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). - _Wesley Ivan Hurt_, Jun 22 2024

%e a(5) = 30; 5 has exactly 2 partitions into two parts, (4,1) and (3,2). Squaring the parts and adding, we get: 1^2 + 2^2 + 3^2 + 4^2 = 30.

%p a:=n->sum(i^2 + (n-i)^2, i=1..floor(n/2)); seq((a(k), k=1..40);

%t Array[Sum[i^2 + (# - i)^2, {i, Floor[#/2]}] &, 39] (* _Michael De Vlieger_, Jan 23 2018 *)

%t LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,2,5,18,30,64,91},50] (* _Harvey P. Dale_, Jul 23 2019 *)

%o (Magma) [n*(8*n^2 - 9*n + 4)/24 + (-1)^n*n^2/8 : n in [1..80]]; // _Wesley Ivan Hurt_, Jun 22 2024

%K nonn,easy

%O 1,2

%A _Wesley Ivan Hurt_, May 27 2013