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.

A071619 a(n) = ceiling(2*n^2 / 3).

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 24, 33, 43, 54, 67, 81, 96, 113, 131, 150, 171, 193, 216, 241, 267, 294, 323, 353, 384, 417, 451, 486, 523, 561, 600, 641, 683, 726, 771, 817, 864, 913, 963, 1014, 1067, 1121, 1176, 1233, 1291, 1350, 1411, 1473, 1536, 1601, 1667, 1734, 1803, 1873
Offset: 0

Views

Author

N. J. A. Sloane, Jun 21 2002

Keywords

Comments

Old name was: If n mod 3 = 0 then 6*(n/3)^2 elif n mod 3 = 1 then 6*((n-2)/3)^2+8*(n-2)/3 + 3 else 6*((n-1)/3)^2+4*(n-1)/3+1.
From Ray G. Opao, Oct 20 2022: (Start)
For n >= 3, a(n) is the maximum number of objects that can be placed on an n X n grid such that no 3 adjacent grid points on the same row or column are occupied.
The first 5 terms of this description are illustrated in the Opao link. (End)

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 64.

Crossrefs

Partial sums of A042968.
Essentially a bisection of A156040.

Programs

  • Magma
    [Ceiling(2*n^2/3): n in [0..100]]; // Wesley Ivan Hurt, Mar 12 2015
  • Maple
    A071619 := proc(n) if n mod 3 = 0 then 6*(n/3)^2 elif n mod 3 = 1 then 6*((n-1)/3)^2+4*(n-1)/3+1 else 6*((n-2)/3)^2+8*(n-2)/3 +3; fi; end;
  • Mathematica
    f[n_] := Which[Divisible[n, 3], 6(n/3)^2, Mod[n, 3] == 1, 6(((n - 1)/3)^2) + 4 (n - 1)/3 + 1, True, 6((n - 2)/3)^2 + 8((n - 2)/3) + 3]; Array[f, 60, 0] (* or *) LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 3, 6, 11}, 60] (* Harvey P. Dale, Feb 28 2012 *)
    CoefficientList[Series[((x * (1 + x) * (1 + x^2))/((1 + x + x^2) * (1 - x)^3)), {x, 0, 53}], x] (* L. Edson Jeffery, Jul 30 2014 *)
    Ceiling[2Range[0, 49]^2/3] (* Alonso del Arte, Mar 13 2015 *)
    Table[n^2 - Floor[n^2/3], {n, 0, 60}] (* Bruno Berselli, Jan 18 2017 *)
  • PARI
    f=(x,y)->6*((x-y)/3)^2+4*y*(x-y)/3+y*(y+1)/2;
    a(n)=f(n,n%3); \\ R. J. Cano, Jul 20 2014
    

Formula

From Vladeta Jovovic, Jun 23 2002: (Start)
a(n) = (2/3)*n^2 if n mod 3 = 0, otherwise (2/3)*n^2 + 1/3.
Recurrence: a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
G.f.: x*(1 + x)*(1 + x^2)/(1 + x + x^2)/(1 - x)^3. (End)
a(n) = ceiling(2*n^2 / 3). - Wesley Ivan Hurt, Jun 20 2013
a(n) + a(n+1) + a(n+2) = A005893(n+1). - R. J. Mathar, Mar 01 2014
a(n+1) = A156040(2*n). - L. Edson Jeffery, Jul 30 2014
Let F(x,y) = 6*((x-y)/3)^2 + 4*y*(x-y)/3 + y*(y+1)/2; then a(n) = F(n,(n mod 3)). - R. J. Cano, Jul 30 2014
a(n) = Sum_{j=1..n} Sum_{i=1..n} ceiling((i+j-n)/3). - Wesley Ivan Hurt, Mar 12 2015
a(n) = n^2 - floor(n^2/3) = (2/9)*(3*n^2 + 1 - cos(2*Pi*n/3)). - Bruno Berselli, Jan 18 2017
E.g.f.: (2*exp(x)*(1 + 3*x*(1 + x)) - 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 17 2022
Sum_{n>=1} 1/a(n) = Pi^2/36 + 3*c*sinh(c)/(1+2*cosh(c)), where c = Pi*sqrt(2)/3. - Amiram Eldar, Jan 08 2023

Extensions

Corrected definition (Old Name) from Harvey P. Dale, Feb 28 2012
New name from Wesley Ivan Hurt, Mar 13 2015