|
|
A177723
|
|
Number of line segments connecting exactly 7 points in an n X n grid of points.
|
|
1
|
|
|
0, 0, 0, 0, 0, 0, 16, 40, 72, 112, 160, 216, 308, 416, 540, 680, 836, 1008, 1276, 1576, 1908, 2272, 2668, 3096, 3660, 4272, 4932, 5640, 6396, 7200, 8308, 9496, 10764, 12112, 13540, 15048, 16788, 18624, 20556, 22584, 24708, 26928, 29772, 32760
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
COMMENTS
|
a(n) is also the number of pairs of points visible to each other exactly through 5 points in an n X n grid of points.
|
|
LINKS
|
|
|
FORMULA
|
See Mathematica code.
|
|
MATHEMATICA
|
j=6;
a[n_]:=a[n]=If[n<=j, 0, 2*a1[n]-a[n-1]+R1[n]]
a1[n_]:=a1[n]=If[n<=j, 0, 2*a[n-1]-a1[n-1]+R2[n]]
R1[n_]:=R1[n]=If[n<=j, 0, R1[n-1]+4*S[n]]
R2[n_]:=(n-1)*S[n]
S[n_]:=If[Mod[n-1, j]==0, EulerPhi[(n-1)/j], 0]
Table[a[n], {n, 1, 50}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|