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.

A241222 Number of collinear point triples on a centered hexagonal grid of size n.

This page as a plain text file.
%I A241222 #14 Feb 16 2025 08:33:21
%S A241222 0,3,69,390,1314,3441,7503,14388,25692,42471,66417,100194,145206,
%T A241222 204429,280971,377400,496608,642891,821925,1034742,1288602,1587009,
%U A241222 1933695,2339100,2802804,3334983,3942585,4627002,5404542,6278661,7252539,8332968,9537456
%N A241222 Number of collinear point triples on a centered hexagonal grid of size n.
%C A241222 A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.
%H A241222 Andrew Howroyd, <a href="/A241222/b241222.txt">Table of n, a(n) for n = 1..200</a>
%H A241222 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HexNumber.html">Hex Number</a>.
%e A241222 For n = 2 the points are on the three diagonals through the center of the hexagon as following:
%e A241222     . .     . *     * .
%e A241222    * * *   . * .   . * .
%e A241222     . .     * .     . *
%o A241222 (PARI)
%o A241222 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)))))}
%o A241222 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)}
%o A241222 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}
%o A241222 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
%Y A241222 Cf. A000938, A241220.
%K A241222 nonn
%O A241222 1,2
%A A241222 _Martin Renner_, Apr 17 2014
%E A241222 a(7) from _Martin Renner_, May 31 2014
%E A241222 a(8)-a(22) from _Giovanni Resta_, May 31 2014
%E A241222 Terms a(23) and beyond from _Andrew Howroyd_, Sep 18 2017