This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A294286 #34 Dec 03 2023 10:14:26 %S A294286 0,0,5,10,30,46,91,124,204,260,385,470,650,770,1015,1176,1496,1704, %T A294286 2109,2370,2870,3190,3795,4180,4900,5356,6201,6734,7714,8330,9455, %U A294286 10160,11440,12240,13685,14586,16206,17214,19019,20140,22140,23380,25585,26950,29370 %N A294286 Sum of the squares of the parts in the partitions of n into two distinct parts. %H A294286 Iain Fox, <a href="/A294286/b294286.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Colin Barker) %H A294286 <a href="/index/Par#part">Index entries for sequences related to partitions</a> %H A294286 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1). %F A294286 a(n) = Sum_{i=1..floor((n-1)/2)} i^2 + (n-i)^2. %F A294286 From _David A. Corneth_, Oct 27 2017: (Start) %F A294286 For odd n, a(n) = n^3/3 - n^2/2 + n/6 = A000330(n + 1). %F A294286 For even n, a(n) = n^3/3 - 3*n^2/4 + n/6. %F A294286 (End) %F A294286 From _Colin Barker_, Nov 04 2017: (Start) %F A294286 G.f.: x^3*(5 + 5*x + 5*x^2 + x^3) / ((1 - x)^4*(1 + x)^3). %F A294286 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. %F A294286 (End) %F A294286 a(n) = n*(2*n^2-3*n*(5+(-1)^n)/4+1)/6. - _Wesley Ivan Hurt_, Dec 03 2023 %e A294286 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. %e A294286 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 %t A294286 Table[Sum[i^2 + (n - i)^2, {i, Floor[(n-1)/2]}], {n, 40}] %t A294286 Table[Total[Flatten[Select[IntegerPartitions[n,{2}],#[[1]]!=#[[2]]&]]^2],{n,50}] (* _Harvey P. Dale_, Dec 02 2022 *) %o A294286 (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 %o A294286 (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 %o A294286 (Magma) [n*(2*n^2-3*n*(5+(-1)^n)/4+1)/6 : n in [1..60]]; // _Wesley Ivan Hurt_, Dec 03 2023 %Y A294286 Cf. A000330. %K A294286 nonn,easy %O A294286 1,3 %A A294286 _Wesley Ivan Hurt_, Oct 26 2017