OFFSET
1,2
COMMENTS
Prime values of n yield many more solutions than composite values. If (x,y,z) is a solution, then (nx,ny,nz) is a solution of the equations in A094185. All solutions appear to be in the polytope n < x <= 2n+1, x < y <= 2n^2+2n-1, y < z <= n^4+2n^3+2n^2+n-1.
There are at least two solutions for all n > 1, given by (x,y,z) = (n+1, n^2+n+1, n^4+2n^3+2n^2+n-1) and (x,y,z) = (n+1, 2n^2+2n-1, 2n^2+2n+1). Following the linked solution by Silvia Fernández, it can be shown that all solutions satisfy 1 < x <= 3n - 1, x < y <= 2nx - 1, and y < z <= nxy - 1. Contrary to the above comment, there are solutions satisfying x > 2n+1. The first such example is given by (x,y,z) = (31,45,59) when n = 14. - Robin Visser, Dec 18 2023
LINKS
Robin Visser, Table of n, a(n) for n = 1..300
Donald Knuth, Silvia Fernández and Gerry Myerson, A Modular Triple: 11021, Amer. Math. Monthly, 112 (2005), p. 279.
EXAMPLE
a(2) = 2 because there are 2 solutions: (x,y,z) = (3, 7, 41) and (3, 11, 13).
MATHEMATICA
Table[cnt=0; Do[d=Divisors[n*x*y-1]; Do[z=d[[i]]; If[z>y && Mod[n*x*z, y]==1 && Mod[n*y*z, x]==1, cnt++ ], {i, Length[d]}], {x, 3n-1}, {y, x+1, 2n*x-1}]; cnt, {n, 64}]
PROG
(Sage)
def a(n):
ans = 0
for x in range(2, 3*n):
for y in range(x+1, 2*n*x):
for z in Integer(n*x*y-1).divisors():
if (z > y) and ((n*y*z)%x)==1 and ((n*z*x)%y)==1:
ans += 1
return ans # Robin Visser, Dec 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 13 2004
EXTENSIONS
Corrected by Robin Visser, Dec 18 2023
STATUS
approved