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.

A268684 a(n) = n*(n + 1)*(4*n - 1)/3.

Original entry on oeis.org

0, 2, 14, 44, 100, 190, 322, 504, 744, 1050, 1430, 1892, 2444, 3094, 3850, 4720, 5712, 6834, 8094, 9500, 11060, 12782, 14674, 16744, 19000, 21450, 24102, 26964, 30044, 33350, 36890, 40672, 44704, 48994, 53550, 58380, 63492, 68894, 74594, 80600, 86920
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 11 2016

Keywords

Comments

Partial sums of A002939.
a(n) is the maximum value obtainable by partitioning the set {x in the natural numbers | 1 <= x <= 2n} into pairs, taking the products of all such pairs, and taking the sum of all such products. - Thomas Anton, Oct 20 2020

Examples

			a(0) = 0;
a(1) = 0 + 1*2 = 2;
a(2) = 0 + 1*2 + 3*4 = 14;
a(3) = 0 + 1*2 + 3*4 + 5*6 = 44;
a(4) = 0 + 1*2 + 3*4 + 5*6 + 7*8 = 100;
a(5) = 0 + 1*2 + 3*4 + 5*6 + 7*8 + 9*10 = 190, etc.
		

Crossrefs

Programs

  • Magma
    [n*(n + 1)*(4*n - 1)/3: n in [0..40]]; // Vincenzo Librandi, Feb 11 2016
    
  • Mathematica
    Table[n (n + 1) ((4 n - 1)/3), {n, 0, 40}] (* or *)
    LinearRecurrence[{4, -6, 4, -1}, {0, 2, 14, 44}, 40]
    CoefficientList[Series[2 x (3 x + 1) / (x - 1)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 11 2016 *)
  • PARI
    a(n)=n*(n+1)*(4*n-1)/3 \\ Charles R Greathouse IV, Jul 26 2016

Formula

G.f.: 2*x*(3*x + 1)/(x - 1)^4.
a(n) = Sum_{k = 0..n} 2*k*(2*k - 1).
Sum_{n>=1} 1/a(n) = -3*(2*Pi - 12*log(2) + 1)/5 = 0.620748515723854...
a(n) mod 2 = 0.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*(1 + 2*sqrt(2)*Pi - 2*(3 + sqrt(2))*log(2) + 4*sqrt(2)*log(2-sqrt(2)))/5. - Amiram Eldar, Nov 05 2020