OFFSET
0,2
COMMENTS
Let P be a polygon with vertices (0,0), (0,2), (1,1) and (0,3/2). The number of integer points in nP is counted by this quasi-polynomial (nP is the n-fold dilation of P). See Wikipedia in Links section.
From Bob Selcoe, Sep 10 2016: (Start)
a(n) = the number of partitions in reverse lexicographic order starting with n 3's followed by n 2's; i.e., the number of partitions summing to 5n such that no part > 3 and the number of 3's digits <= the number of 2's digits.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Wikipedia, Examples of Ehrhart Quasi-Polynomials.
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
O.g.f.: (1 + 3*x + 3*x^2)/((1 - x)^3*(1 + x)).
E.g.f.: (7 + 34*x + 14*x^2)*exp(x)/8 + exp(-x)/8.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(2*k) = k*(7*k + 5) + 1, a(2*k+1) = (k + 1)*(7*k + 5).
From Bob Selcoe, Sep 10 2016 (Start):
a(n) = (n+1)^2 + A006578(n).
a(n) = a(n-1) + A047346(n+1).
a(n) = Sum_{j=0..n} floor((2n+3j+2)/2).
(End)
EXAMPLE
a(1) = 5; the 5 partitions are: {3,2}; {3,1,1}; {2,2,1}; {2,1,1,1}; {1,1,1,1,1}.
a(3) = 24: floor(8/2) + floor(11/2) + floor(14/2) + floor(17/2) = 4+5+7+8 = 24.
MATHEMATICA
Table[(7/4) n^2 + (5/2) n + (7 + (-1)^n)/8, {n, 0, 50}]
PROG
(Magma) [(7/4)*n^2+(5/2)*n+(7+(-1)^n)/8: n in [0..50]];
(PARI) Vec((1+3*x+3*x^2)/((1-x)^3*(1+x)) + O(x^99)) \\ Altug Alkan, Sep 10 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Apr 20 2016
EXTENSIONS
Edited and extended by Bruno Berselli, Apr 20 2016
STATUS
approved