Find the largest prime number p<1000 for which there exists a complex number z satisfying
• the real and imaginary part of z are both integers;
• ∣z∣=p, and
• there exists a triangle whose three side lengths are p, the real part of z3, and the imaginary part of z3.
Your answer
Integer from 0 to 999
Show solution
Solution
Write z=a+bi with a2+b2=p. The prime p=2 does qualify: for z=−1+i we have z3=2+2i, but it cannot be the largest answer. Hence consider an odd prime p, so p≡1(mod4) and the pair {∣a∣,∣b∣} is unique. Replacing z by ±z,±zˉ,±iz,±izˉ only changes the real and imaginary parts of z3 by signs and swaps, so we may take a>b>0, and the two candidate side lengths are ∣Rez3∣ and ∣Imz3∣. Expanding z3=(a3−3ab2)+(3a2b−b3)i and factoring, Rez3+Imz3=(a−b)(p+4ab),Rez3−Imz3=(a+b)(p−4ab). The triangle exists exactly when ∣Re∣−∣Im∣<p<∣Re∣+∣Im∣, and those two quantities are, in some order, the absolute values above. Since a>b forces (a−b)(p+4ab)>p, the whole condition reduces to (a+b)∣p−4ab∣<p.
Because a+b>a2+b2=p, this requires Δ=∣p−4ab∣<p. The bound p=a2+b2<1000 gives 1≤b<a≤31; moreover b≤21, because b≥22 would force a≥23 and p≥222+232>1000. Substituting p=a2+b2 into (a2+b2−4ab)2<a2+b2 and checking these bounded integers gives the complete list of possible values p∈{10,17,53,68,130,153,212,241,272,349,386,520,565,725,778,905,964}. Only four values in this list are prime, at (a,b,p,Δ)=(4,1,17,1),(7,2,53,3),(15,4,241,1),(18,5,349,11). The corresponding values of (a+b)Δ are 5,27,19,253, respectively, all below p, so all four also pass the full triangle inequality. Thus the largest possible prime is 349.
Indeed for z=18+5i we get z3=4482+4735i, and the lengths 349,4482,4735 form a valid triangle. The answer is 349.