cp's OEIS Frontend

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.

A190798 Maximum value of k^2 * (n-k).

This page as a plain text file.
%I A190798 #24 Jan 02 2025 18:51:55
%S A190798 0,0,1,4,9,18,32,50,75,108,147,196,256,324,405,500,605,726,864,1014,
%T A190798 1183,1372,1575,1800,2048,2312,2601,2916,3249,3610,4000,4410,4851,
%U A190798 5324,5819,6348,6912,7500,8125,8788,9477,10206,10976,11774,12615,13500,14415,15376,16384,17424,18513,19652,20825,22050,23328,24642,26011,27436,28899,30420,32000
%N A190798 Maximum value of k^2 * (n-k).
%H A190798 G. C. Greubel, <a href="/A190798/b190798.txt">Table of n, a(n) for n = 0..5000</a>
%H A190798 <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2,-4,2,-1,2,-1).
%F A190798 a(n) = k^2 * (n-k), where k = round(2*n/3).
%F A190798 a(3*n) = 4*n^3, a(3*n-1) = n*(2*n-1)^2, a(3*n+1) = n*(2*n+1)^2.
%F A190798 O.g.f.: x^2*(1+x)^2*(1+x^2)/((1-x)^4*(1+x+x^2)^2).
%F A190798 a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3) - 4*a(n-4) + 2*a(n-5) - a(n-6) + 2*a(n-7) - a(n-8) for n >= 8.
%F A190798 a(-n) = -a(n). - _Michael Somos_, May 22 2011
%t A190798 CoefficientList[Series[x^2*(1+x)^2*(1+x^2)/((1-x)^4*(1+x+x^2)^2), {x, 0, 50}], x] (* _G. C. Greubel_, Aug 13 2018 *)
%o A190798 (PARI) a(n)=my(k=2*n\/3);k^2*(n-k) \\ _Charles R Greathouse IV_, May 20 2011
%o A190798 (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); [0,0] cat Coefficients(R!(x^2*(1+x)^2*(1+x^2)/((1-x)^4*(1+x+x^2)^2))); // _G. C. Greubel_, Aug 13 2018
%Y A190798 Cf. A002620 (max of k * (n-k)).
%K A190798 nonn,easy
%O A190798 0,4
%A A190798 _Franklin T. Adams-Watters_, May 20 2011