已知P为质数,方程P^2+1=2Y^2,P+1=2X^2,有整数解,求p

问题描述:

已知P为质数,方程P^2+1=2Y^2,P+1=2X^2,有整数解,求p

首先,易见若有整数解则有正整数解,不妨设x,y > 0.
两式相加得(p+1)² > p²+p+2 = 2y²+2x² = (y+x)²+(y-x)² ≥ (y+x)²,即p+1 > y+x,于是p ≥ y+x.
两式相减得p(p-1) = 2y²-2x² = 2(y-x)(y+x),有y-x > 0且p | 2(y-x)(y+x).
由x,y > 0,p ≥ y+x > y-x > 0,故p不整除y-x.
易见p = 2时方程无整数解,故p不整除2.
而p是质数,只有p | y+x.又p ≥ y+x > 0,故 p = y+x.
代回得p-1 = 2(y-x).x = (p+1)/4,代入p+1 = 2x²得(p-7)(p+1) = 0.则p = 7.
可验证p = 7时x = 2,y = 5为整数解.