login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A241220 Number of lines through at least two points of a centered hexagonal grid of size n. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.
LINKS
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
Sequence in context: A247958 A108674 A050405 * A279740 A281189 A206383
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)