

A177725


Number of line segments connecting exactly 9 points in an n x n grid of points


0



0, 0, 0, 0, 0, 0, 0, 0, 20, 48, 84, 128, 180, 240, 308, 384, 504, 640, 792, 960, 1144, 1344, 1560, 1792, 2144, 2528, 2944, 3392, 3872, 4384, 4928, 5504, 6248, 7040, 7880, 8768, 9704, 10688, 11720, 12800, 14264, 15808, 17432, 19136, 20920, 22784, 24728, 26752
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,9


COMMENTS

a(n) is also the number of pairs of points visible to each other exactly through 7 points in an n x n grid of points.


LINKS

Table of n, a(n) for n=1..48.
S. Mustonen, On lines going through a given number of points in a rectangular grid of points


FORMULA

See Mathematica code.


MATHEMATICA

j=8;
a[n_]:=a[n]=If[n<=j, 0, 2*a1[n]a[n1]+R1[n]]
a1[n_]:=a1[n]=If[n<=j, 0, 2*a[n1]a1[n1]+R2[n]]
R1[n_]:=R1[n]=If[n<=j, 0, R1[n1]+4*S[n]]
R2[n_]:=(n1)*S[n]
S[n_]:=If[Mod[n1, j]==0, EulerPhi[(n1)/j], 0]
Table[a[n], {n, 1, 50}]


CROSSREFS

Sequence in context: A234259 A135286 A338235 * A264444 A053245 A115882
Adjacent sequences: A177722 A177723 A177724 * A177726 A177727 A177728


KEYWORD

nonn


AUTHOR

Seppo Mustonen, May 13 2010


STATUS

approved



