OFFSET
0,2
COMMENTS
Number of lattice points (x,y) in the region of the coordinate plane bounded by y < 3x+1, y > x/2 and x <= n. - Wesley Ivan Hurt, Oct 27 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
a(n) = floor((n+1)^2/4)+n*(n+1).
G.f.: x*(2*x+3)/((1-x)^3*(1+x)).
From Wesley Ivan Hurt, Oct 27 2014: (Start)
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).
a(n) = (10*n^2 + 12*n + 1 - (-1)^n)/8.
a(n) = Sum_{i=1..n+1} (10*i + (-1)^i - 9)/4. (End)
E.g.f.: (x*(11 + 5*x)*cosh(x) + (1 + 11*x + 5*x^2)*sinh(x))/4. - Stefano Spezia, Aug 22 2023
MAPLE
A115006:=n->(10*n^2 + 12*n + 1 - (-1)^n)/8: seq(A115006(n), n=0..50); # Wesley Ivan Hurt, Oct 27 2014
MATHEMATICA
Table[(10*n^2 + 12*n + 1 - (-1)^n)/8, {n, 0, 50}] (* Wesley Ivan Hurt, Oct 27 2014 *)
LinearRecurrence[{2, 0, -2, 1}, {0, 3, 8, 16}, 60] (* Harvey P. Dale, Jan 13 2015 *)
PROG
(Magma) [ n*(n+1) + (n+1)^2 div 4: n in [0..50] ];
(PARI) {for(n=0, 50, print1(n*(n+1)+floor((n+1)^2/4), ", "))}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 23 2006
EXTENSIONS
Edited by Klaus Brockhaus, Nov 18 2008
STATUS
approved