login
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
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.
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
Sequence in context: A024814 A340460 A268319 * A165761 A165765 A058486
KEYWORD
nonn
AUTHOR
Seppo Mustonen, May 13 2010
STATUS
approved