OFFSET
1,2
COMMENTS
A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
Eric Weisstein's World of Mathematics, Hex Number.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Martin Renner, Apr 17 2014
EXTENSIONS
a(15)-a(16) from Martin Renner, Apr 27 2014
Terms a(17) and beyond from Andrew Howroyd, Sep 18 2017
STATUS
approved