login
A177724
Number of line segments connecting exactly 8 points in an n x n grid of points
0
0, 0, 0, 0, 0, 0, 0, 18, 44, 78, 120, 170, 228, 294, 400, 522, 660, 814, 984, 1170, 1372, 1682, 2024, 2398, 2804, 3242, 3712, 4214, 4868, 5570, 6320, 7118, 7964, 8858, 9800, 11086, 12452, 13898, 15424, 17030, 18716, 20482, 22504, 24622, 26836, 29146
OFFSET
1,8
COMMENTS
a(n) is also the number of pairs of points visible to each other exactly through 6 points in an n x n grid of points.
FORMULA
See Mathematica code.
MATHEMATICA
j=7;
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
Sequence in context: A049067 A114814 A299383 * A095739 A055577 A281917
KEYWORD
nonn
AUTHOR
Seppo Mustonen, May 13 2010
STATUS
approved