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.

A005436 Number of convex polygons of perimeter 2n on square lattice.

Original entry on oeis.org

1, 2, 7, 28, 120, 528, 2344, 10416, 46160, 203680, 894312, 3907056, 16986352, 73512288, 316786960, 1359763168, 5815457184, 24788842304, 105340982248, 446389242480, 1886695382192, 7955156287456, 33468262290096, 140516110684832, 588832418973280, 2463133441338048
Offset: 2

Views

Author

Keywords

Comments

Or, a(n) = number of convex polyominoes of perimeter 2n. - David Callan, Jul 25 2008

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [1,2] cat [4^n*(2*n+11)-4*(2*n+1)*Binomial(2*n,n): n in [0..25]]; // Vincenzo Librandi, Jun 25 2015
    
  • Maple
    t1:=x^2*( (1-6*x+11*x^2-4*x^3)/(1-4*x)^2 - 4*x^2/(1-4*x)^(3/2));
    series(t1,x,40);
    gfun:-seriestolist(%); # N. J. A. Sloane, Aug 02 2015
  • Mathematica
    Join[{1, 2}, Table[(2 n + 11) 4^n - 4 (2 n + 1) Binomial[2 n, n], {n, 0, 25}]] (* Vincenzo Librandi, Jun 25 2015 *)
  • SageMath
    def A005436(n): return (2*n+3)*4^(n-4) -4*(n-3)*binomial(2*n-7, n-4) + (9/16)*int(n==2) - (1/4)*int(n==3)
    [A005436(n) for n in range(2,40)] # G. C. Greubel, Nov 20 2022

Formula

a(n) = (2*n + 3)*4^(n-4) - 4*(n-3)*C(2*n-7, n-4) for n >= 4. - Corrected by Robert Israel, Apr 04 2016
a(n) = A005768(n) + A005769(n) + A005770(n).
a(n) = (2*n+11)*4^n - 4*(2*n+1)*binomial(2*n,n) produces the terms (except the first two) with a different offset. - N. J. A. Sloane, Oct 14 2017
G.f.: x^2*(1-6*x+11*x^2-4*x^3)/(1-4*x)^2 - 4*x^4*(1-4*x)^(-3/2). - Markus Voege (voege(AT)blagny.inria.fr), Nov 28 2003
a(n) = (2*(8*n^2 -106*n +303)*a(n-1) - 8*(2*n-9)*(2*n-17)*a(n-2))/((n-4)*(2*n- 19)), with a(2) = 1, a(3) = 2, a(4) = 7, a(4) = 28. - G. C. Greubel, Nov 20 2022