login
Number of equilateral triangles of edge length square root of 2n and having vertices in Z^4, one of which is the origin.
0

%I #17 Jun 07 2020 05:20:37

%S 96,96,672,96,1152,672,1344,96,3264,1152,2304,672,2496,1344,8064,96,

%T 3456,3264,3648,1152,9408,2304,4608,672,9312,2496,13632,1344,5760,

%U 8064,5952,96,16128,3456,16128,3264,7104,3648,17472,1152,8064,9408,8256,2304,39168,4608

%N Number of equilateral triangles of edge length square root of 2n and having vertices in Z^4, one of which is the origin.

%C A parity argument shows that the edge length of an equilateral triangle with vertices in Z^4 must be the square root of an even integer.

%C A characterization of the planes in which an equilateral triangle with vertices in Z^4 can lie is given in the Ionascu reference.

%H E.J. Ionascu, <a href="https://arxiv.org/abs/1209.0147">Equilateral triangles in Z^4</a>, arXiv:1209.0147 [math.NT], 2012-2013; Vietnam J. Math. 43 (3) (2015), 525-539.

%F a(2n) = a(n).

%t a[n_] := a[n] = If[ EvenQ[n], a[n/2], Block[{p, c=0, v = Tuples[ {1, -1}, 4]}, p = Union@ Flatten[ Table[ Union[ Permutations /@ ((q #) & /@ v)], {q, PowersRepresentations[2 n, 4, 2]}], 2]; Do[ If[ Total[ (p[[i]] - p[[j]])^2] == 2 n, c++], {i, Length@ p}, {j, i-1}]; c]]; Array[a, 30] (* _Giovanni Resta_, May 08 2020 *)

%K nonn

%O 1,1

%A _Matt Noble_ and Will Farran, May 07 2020