OFFSET
1,2
COMMENTS
Fourth diagonal of A143974, associated with counting unit squares in a lattice.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..3000
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
a(n) = floor(n*(n+3)/3).
From R. J. Mathar, Oct 05 2009: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
G.f.: x*(-1 - x - x^2 + x^3)/( (1 + x + x^2) * (x-1)^3). (End)
9*a(n) = 3*n^2 + 9*n - 2 + A099837(n+3). - R. J. Mathar, Apr 26 2022
Sum_{n>=1} 1/a(n) = 4/3 + (tan((sqrt(13)+2)*Pi/6) - cot((sqrt(13)+1)*Pi/6)) * Pi/sqrt(13). - Amiram Eldar, Oct 01 2022
E.g.f.: (exp(x)*(3*x*(4 + x) - 2) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - Stefano Spezia, Oct 24 2022
EXAMPLE
MATHEMATICA
a[n_] := Floor[n*(n+3)/3]; Array[a, 60] (* Amiram Eldar, Oct 01 2022 *)
PROG
(Magma) [Floor(n*(n+3)/3): n in [1..60]]; // Vincenzo Librandi, May 08 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 06 2008
STATUS
approved