A002789 Number of integer points in a certain quadrilateral scaled by a factor of n.
2, 4, 7, 11, 16, 21, 28, 35, 43, 52, 62, 72, 84, 96, 109, 123, 138, 153, 170, 187, 205, 224, 244, 264, 286, 308, 331, 355, 380, 405, 432, 459, 487, 516, 546, 576, 608, 640, 673, 707, 742, 777, 814, 851, 889, 928, 968, 1008, 1050, 1092, 1135, 1179, 1224, 1269
Offset: 1
Keywords
Examples
G.f. = 2*x + 4*x^2 + 7*x^3 + 11*x^4 + 16*x^5 + 21*x^6 + 28*x^7 + 35*x^8 + ...
References
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- E. Ehrhart, Sur un problème de géométrie diophantienne linéaire I, (Polyèdres et réseaux), J. Reine Angew. Math. 226 1967 1-29. MR0213320 (35 #4184).
- E. Ehrhart, Sur un problème de géométrie diophantienne linéaire I, (Polyèdres et réseaux), J. Reine Angew. Math. 226 1967 1-29. MR0213320 (35 #4184). [Annotated scanned copy of pages 16 and 22 only]
- E. Ehrhart, Sur un problème de géométrie diophantienne linéaire II. Systemes diophantiens lineaires, J. Reine Angew. Math. 227 1967 25-49. [Annotated scanned copy of pages 47-49 only]
- Wikipedia, Ehrhart polynomial
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1,-1,1).
Programs
-
Mathematica
a[ n_] := Quotient[ 7 + 12 n + 5 n^2, 12]; (* Michael Somos, May 22 2014 *) a[ n_] := Length @ With[{o = Boole[ 0 < n], c = Boole[ 0 >= n], m = Abs@n}, FindInstance[ 0 < o + x && 0 < o + y && (2 x < o + m && 4 x + 3 y < c + 3 m || m < c + 2 x && 2 x + 3 y < o + 2 m), {x, y}, Integers, 10^9]]; (* Michael Somos, May 22 2014 *)
-
PARI
{a(n) = (7 + 12*n + 5*n^2) \ 12}; /* Michael Somos, May 22 2014 */
-
PARI
{a(n) = if( n<0, polcoeff( x^3 * (1 + x + x^2 + 2*x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^-n), -n), polcoeff( x * (2 + x^2 + x^3 + x^4) / ((1 - x)^2 * (1 - x^6)) + x * O(x^n), n))}; /* Michael Somos, May 22 2014 */
Formula
G.f.: x * (2 + 2*x + x^2) / (1 - x - x^2 + x^4 + x^5 - x^6) = (2*x + x^3 + x^4 + x^5) / ((1 - x)^2 * (1 - x^6)). - Michael Somos, May 22 2014
a(n) = floor( A168668(n+1) / 12), a(n) = A242771(-n), a(n) - a(n-1) = A242774(n) for all n in Z. - Michael Somos, May 22 2014
Comments