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.

A206806 Sum_{0A002620(j) is the j-th quarter-square.

Original entry on oeis.org

1, 4, 13, 30, 62, 112, 190, 300, 455, 660, 931, 1274, 1708, 2240, 2892, 3672, 4605, 5700, 6985, 8470, 10186, 12144, 14378, 16900, 19747, 22932, 26495, 30450, 34840, 39680, 45016, 50864, 57273, 64260, 71877, 80142, 89110, 98800, 109270, 120540, 132671, 145684
Offset: 2

Views

Author

Clark Kimberling, Feb 15 2012

Keywords

Comments

Partial sums of A049774. For a guide to related sequences, see A206817.

Crossrefs

Programs

  • Magma
    [(108-36*n-n^2+n^4+(70*n-266)*Ceiling((3-n)/2)-(42*n-234)*Ceiling((3-n)/2)^2+(8*n-88)*Ceiling((3-n)/2)^3+12*Ceiling((3-n)/2)^4-4*n*Floor(n/2)-(12*n-12)*Floor(n/2)^2-(8*n-24)*Floor(n/2)^3+12*Floor(n/2)^4)/12: n in [2..50]]; // Wesley Ivan Hurt, Jul 10 2014
    
  • Maple
    A206806:=n->add(i*(n-i)*(i-ceil((i-1)/2)), i=1..n): seq(A206806(n), n=2..50); # Wesley Ivan Hurt, Jul 10 2014
  • Mathematica
    s[k_] := Floor[k/2]*Ceiling[k/2]; t[1] = 0;
    Table[s[k], {k, 1, 20}]    (* A002620 *)
    p[n_] := Sum[s[k], {k, 1, n}];
    c[n_] := n*s[n] - p[n];
    t[n_] := t[n - 1] + (n - 1) s[n] - p[n - 1]
    Table[c[n], {n, 2, 50}]    (* A049774 *)
    f = Flatten[Table[t[n], {n, 2, 50}]]  (* A206806 *)
    Table[Sum[i (n - i) (i - Ceiling[(i - 1)/2]), {i, n}], {n, 2, 50}] (* Wesley Ivan Hurt, Jul 10 2014 *)
    CoefficientList[Series[-(2 x^2 + x + 1)/((x - 1)^5 (x + 1)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 10 2014 *)
  • PARI
    vector(100, n, ((n+1)*(1+3*(-1)^(n+1)-2*(n+1)+2*(n+1)^2+2*(n+1)^3))/48) \\ Colin Barker, Jul 10 2014
    
  • PARI
    Vec(-x^2*(2*x^2+x+1)/((x-1)^5*(x+1)^2) + O(x^100)) \\ Colin Barker, Jul 10 2014
    
  • Sage
    [sum([sum([floor(k^2/4)-floor(j^2/4) for j in range(1,k)]) for k in range(2,n+1)]) for n in range(2,44)] # Danny Rorabaugh, Apr 18 2015

Formula

From Wesley Ivan Hurt, Jul 10 2014: (Start)
a(n) = Sum_{i=1..n} i * (n-i) * (i-ceiling((i-1)/2)).
a(n) = (108 - 36n - n^2 + n^4 + (70n - 266) * ceiling((3 - n)/2) - (42n - 234) * ceiling((3 - n)/2)^2 + (8n - 88) * ceiling((3 - n)/2)^3 + 12 * ceiling((3 - n)/2)^4 - 4n * floor(n/2) - (12n - 12) * floor(n/2)^2 - (8n - 24) * floor(n/2)^3 + 12 * floor(n/2)^4) / 12. (End)
a(n) = (n*(1+3*(-1)^n-2*n+2*n^2+2*n^3))/48. - Colin Barker, Jul 10 2014
G.f.: -x^2*(2*x^2+x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Jul 10 2014