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.

A131941 Partial sums of ceiling(n^2/2) (A000982).

Original entry on oeis.org

0, 1, 3, 8, 16, 29, 47, 72, 104, 145, 195, 256, 328, 413, 511, 624, 752, 897, 1059, 1240, 1440, 1661, 1903, 2168, 2456, 2769, 3107, 3472, 3864, 4285, 4735, 5216, 5728, 6273, 6851, 7464, 8112, 8797, 9519, 10280, 11080, 11921, 12803, 13728, 14696, 15709
Offset: 0

Views

Author

Gary W. Adamson, Oct 25 2007

Keywords

Comments

Binomial transform of [0, 1, 1, 2, -2, 4, -8, 16, -32, ...].
Starting with offset 1 = (1, 3, 5, 7, ...) convolved with (1, 0, 3, 0, 5, ...). - Gary W. Adamson, Feb 16 2009
Also the number of undirected bishop moves on an n X n chessboard, counted up to rotations of the board. Equivalently, number of undirected bishop moves on an n X n chessboard, counted up to horizontal and vertical reflections of the board. - Hilko Koning, Aug 21 2025

Examples

			a(3) = 8 = 0 + 1 + 2 + 5.
		

Crossrefs

Cf. A000982, A080930 (binomial transform without leading 0).

Programs

  • Magma
    [Ceiling((2*n^3+3*n^2+4*n)/12): n in [0..60]]; // Vincenzo Librandi, Jun 25 2011
  • Maple
    a(n):=round(1/(12)(2*n^(3)+3*n^(2)+4*n))  # Mircea Merca, Oct 10 2010
  • Mathematica
    CoefficientList[Series[x (1 + x^2)/(1 + x)/(1 - x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
    a[n_Integer?Positive] := If[EvenQ[n], With[{m = n/2}, (4 m^3 - 3 m^2 + 2 m)/3],
    With[{m = (n - 1)/2}, (4 m^3 + 3 m^2 + 2 m)/3]];
    Table[a[n], {n, 1, 50}] (* Hilko Koning, Aug 21 2025 *)
  • PARI
    a(n) = (n+[0,1][n%2+1]) * (2*n^2 +[3,1][n%2+1]*n +[4,3][n%2+1])/12 \\ Washington Bomfim, Jul 31 2008
    

Formula

For even n, a(n) = n*(2*n^2 +3*n +4)/12. For odd n, a(n) = (n+1)*(2*n^2 +n +3)/12. - Washington Bomfim, Jul 31 2008
From R. J. Mathar, Feb 24 2010: (Start)
G.f.: x*(1+x^2)/((1+x)*(1-x)^4).
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5). (End)
From Mircea Merca, Oct 10 2010: (Start)
a(n) = round((2*n^3 + 3*n^2 + 4*n)/12) = round((2*n+1)*(2*n^2 + 3*n + 3)/24) = floor((n+1)*(2*n^2 + n + 3)/12) = ceiling((2*n^3 + 3*n^2 + 4*n)/12).
a(n) = a(n-2) + n^2 - n + 1, n > 1. (End)
a(n) = (2*n*(2*n^2 + 3*n + 4) - 3*(-1)^n + 3)/24. - Bruno Berselli, Dec 07 2010
E.g.f.: (x*(9 + 9*x + 2*x^2)*cosh(x) + (3 + 9*x + 9*x^2 + 2*x^3)*sinh(x))/12. - Stefano Spezia, Dec 21 2021