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.

Showing 1-2 of 2 results.

A240826 Number of ways to choose three points on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 35, 969, 7770, 35990, 121485, 333375, 790244, 1679580, 3280455, 5989445, 10349790, 17083794, 27128465, 41674395, 62207880, 90556280, 128936619, 180007425, 246923810, 333395790, 443749845, 582993719, 756884460, 971999700, 1235812175, 1556767485, 1944365094
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.

Crossrefs

Programs

  • Maple
    seq(binomial(3*n^2-3*n+1, 3), n=1..28); # Martin Renner, May 31 2014
    op(PolynomialTools[CoefficientList](convert(series(-x^2*(35*x^4+724*x^3+1722*x^2+724*x+35)/(x-1)^7, x=0, 29), polynom), x)[2..29]); # Martin Renner, May 31 2014
  • Mathematica
    CoefficientList[Series[- x(35 x^4 + 724 x^3 + 1722 x^2 + 724 x + 35)/(x - 1)^7, {x, 0, 50}], x] (* Vincenzo Librandi, Apr 19 2014 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,35,969,7770,35990,121485,333375},40] (* Harvey P. Dale, Sep 12 2019 *)

Formula

a(n) = binomial(A003215(n-1), 3)
= binomial(3*n^2-3*n+1, 3)
= 1/2*n*(n-1)*(3*n^2-3*n+1)*(3*n^2-3*n-1)
= 9/2*n^6-27/2*n^5+27/2*n^4-9/2*n^3-1/2*n^2+1/2*n.
G.f.: -x^2*(35*x^4+724*x^3+1722*x^2+724*x+35) / (x-1)^7. - Colin Barker, Apr 18 2014
Sum_{n>=2} 1/a(n) = sqrt(3/7)*Pi*tan(sqrt(7/3)*Pi/2) + sqrt(3)*Pi*tanh(Pi/(2*sqrt(3))) - 2. - Amiram Eldar, Feb 17 2024

A241220 Number of lines through at least two points of a centered hexagonal grid of size n.

Original entry on oeis.org

0, 15, 84, 312, 852, 1878, 3654, 6546, 10680, 16668, 25002, 35910, 50136, 68190, 90462, 118200, 152274, 192828, 240480, 296880, 361962, 437832, 525756, 625440, 739146, 867864, 1011822, 1174062, 1354572, 1554114, 1775568, 2020848, 2289054, 2582760, 2905410
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.

Crossrefs

Programs

  • PARI
    c(n,s,fmin,fmax)={sum(k=1+s, n, max(0, fmax(k-s)-max(fmin(k)-1,if(k-2*s>0,fmax(k-2*s)))))}
    b(n, u, v)={c(2*n-1, u, i->max(0,i-n)+1+i\u*v, i->min(i,n)+n-1+i\u*v)}
    a(n)={3*((n>1)*(2*n-1) + sum(u=1, 2*n-3, sum(v=1, 2*n-2-u, if(gcd(u,v)==1, b(n,u,v), 0))))} \\ Andrew Howroyd, Sep 18 2017

Extensions

a(15)-a(16) from Martin Renner, Apr 27 2014
Terms a(17) and beyond from Andrew Howroyd, Sep 18 2017
Showing 1-2 of 2 results.