|
|
A177722
|
|
Number of line segments connecting exactly 6 points in an n x n grid of points
|
|
0
|
|
|
0, 0, 0, 0, 0, 14, 36, 66, 104, 150, 228, 322, 432, 558, 700, 926, 1184, 1474, 1796, 2150, 2624, 3146, 3716, 4334, 5000, 5930, 6940, 8030, 9200, 10450, 11908, 13462, 15112, 16858, 18700, 21082, 23608, 26278, 29092, 32050, 35488, 39102, 42892, 46858
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
a(n) is also the number of pairs of points visible to each other exactly through 4 points in an n x n grid of points.
|
|
LINKS
|
|
|
FORMULA
|
See Mathematica code.
|
|
MATHEMATICA
|
j=5;
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
|
|
|
|