OFFSET
1,1
LINKS
T. G. Berry, Points at rational distance from the corners of a unit square, Ann. Scuola Norm. Sup. Pisa Cl. Sci. (4), 17(4):505-529, 1990.
William McCloskey, A Congruence Condition For The Four-Distance Problem, arXiv:1904.12097 [math.NT], 2019. See p. 11. Warning: 115736 is a typo.
EXAMPLE
For n = 1, this boils down to the equations T = 0 (mod 3), X^2 = Y^2 = Z^2 = U^2 = 1 (mod 3), which has 2^4=16 total solutions: (X, Y, Z, U) = 1 or 2 (mod 3).
PROG
(PARI) a(n) = {my(upb = (3^n-1)/2, nb = 0, X, Y, Z, U, T); for (x=1, upb, if (x % 3, X = Mod(x, 3^n); for (y=1, upb, if (y % 3, Y = Mod(y, 3^n); for (z=1, upb, if (z % 3, Z = Mod(z, 3^n); for (u=1, upb, if (y % 3, U = Mod(u, 3^n); forstep (t=0, 2*upb, 3, T = Mod(t, 3^n); if ((2*(Y^4 + T^4) + X^4 + Z^4 == 2*(X^2 + Z^2)*(Y^2 + T^2)) && (U^2 + Y^2 == X^2 + Z^2), nb += 16; ); ); ); ); ); ); ); ); ); ); nb; }
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Marcus, Apr 30 2019
STATUS
approved