If the second cyclotomic block is a prime times a square, its first factor is a square or three times a square
ProvedOddPerfectNumber.Kernel.second_block_first_half_sq_or_three_sqLet be a prime with and put , . If the product is a prime times a perfect square, then is either a perfect square or three times a perfect square.
Indeed the accepted child OddPerfectNumber.Kernel.second_block_gcd_dvd_three (0e45b51d) gives , so the only prime that can divide both blocks is . The square relation says that exactly one prime, namely , occurs to odd multiplicity in . Because the odd multiplicities of and multiply to , precisely one of the two blocks is a square. The block cannot be a square, since for . Hence carries all the odd multiplicity, and since the only prime that may be shared is , the odd-multiplicity prime of is and dividing by the possible single factor leaves a square. This is the elementary shape forced on the first factor of the second cyclotomic block whenever the block is a prime times a square; it is the arithmetic content of the two-prime residual.
import Mathlib
namespace OddPerfectNumber.Kernel
theorem second_block_first_half_sq_or_three_sq (p c y : Nat) (hp : p.Prime) (hp4 : p % 4 = 1)
(hc : c.Prime) (hy : ((p + 1) / 2) * (p ^ 2 - p + 1) = c * y ^ 2) :
(exists z : Nat, (p + 1) / 2 = z ^ 2) ∨ (exists z : Nat, (p + 1) / 2 = 3 * z ^ 2) := by
sorry
end OddPerfectNumber.Kernel