A268020
The number of spheres on which the points defined by A222268 lie.
Original entry on oeis.org
3, 29, 299, 2177, 10482, 41348
Offset: 2
A 2 X 2 X 2 grid of points defines 28 distinct lines which intersect in a total of 15 points (including the original 8 points). One of these points is the center of the grid, 8 of them are the vertices of the cube and 6 are the face-centers of the cube. So, a(2) = 3.
A222267
The number of distinct lines defined by an n X n X n grid of points.
Original entry on oeis.org
28, 253, 1492, 5485, 17092, 41905, 95140, 191773, 364420, 638785, 1085500, 1745389, 2743084, 4136257, 6101740, 8747821, 12377764, 17066737, 23287564, 31174813, 41276548, 53767873, 69544324, 88722973, 112450132, 140859361, 175324636
Offset: 2
Each of the 28 pairs of points on a 2 X 2 X 2 grid of points defines a distinct line, so a(2) = 28.
Of the 351 pairs of points on a 3 X 3 X 3 grid, there are only 253 distinct lines, so a(3) = 253.
-
mq[{x1_, y1_}, {x2_, y2_}] := If[x1 == x2, {x1}, {y2 - y1, x2*y1 - x1*y2}/(x2 - x1)]; two[n_] := Block[{p = Tuples[Range@n, 2]},
Length@Union@Flatten[Table[mq[p[[i]], p[[j]]], {i, 2, n^2}, {j, i - 1}], 1]]; coef[a_, b_] := Block[{d = b - a}, If[d[[1]] == 0, {0}, d *= Sign@d[[1]]/GCD @@ d; {a - d*a[[1]]/d[[1]], d}]]; a[n_] := Block[{p = Tuples[Range@n, 3]}, n*two[n] - 1 + Length@Union@ Flatten[Table[coef[p[[i]], p[[j]]], {i, 2, n^3}, {j, i - 1}], 1]]; Table[v = a[n]; Print@v; v, {n, 2, 12}] (* Giovanni Resta, Feb 14 2013 *)
Showing 1-2 of 2 results.
Comments