A241222 Number of collinear point triples on a centered hexagonal grid of size n.
0, 3, 69, 390, 1314, 3441, 7503, 14388, 25692, 42471, 66417, 100194, 145206, 204429, 280971, 377400, 496608, 642891, 821925, 1034742, 1288602, 1587009, 1933695, 2339100, 2802804, 3334983, 3942585, 4627002, 5404542, 6278661, 7252539, 8332968, 9537456
Offset: 1
Keywords
Examples
For n = 2 the points are on the three diagonals through the center of the hexagon as following: . . . * * . * * * . * . . * . . . * . . *
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..200
- Eric Weisstein's World of Mathematics, Hex Number.
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)} gm(n)={my(v=vector(n)); for(g=2, n, v[g]=binomial(g+1, 3) - sum(k=2, g-1, v[k]*min(k, g-k+1))); v} a(n)={my(gmv=gm(n-1)); 3*(binomial(2*n-1,3) + 2*sum(k=0,n-2,binomial(n+k,3)) + sum(u=1, 2*n-3, sum(v=1, 2*n-2-u, my(m=gmv[gcd(u,v)]);if(m>0, m*b(n,u,v), 0))))} \\ Andrew Howroyd, Sep 18 2017
Extensions
a(7) from Martin Renner, May 31 2014
a(8)-a(22) from Giovanni Resta, May 31 2014
Terms a(23) and beyond from Andrew Howroyd, Sep 18 2017
Comments