回复:A General Solution

来源: 2005-02-06 23:55:56 [旧帖] [给我悄悄话] 本文已被阅读:

Thanks to fzy, I'v worked a more general solution to share with you.

x*(10^k+1)=y^2=(10^k+1)^2*p^2/q^2;
x=(10^k+1)^2*p^2/q^2 (0.1


Since mod(10^k+1, 11)=0, when k is odd, we pick q=11.
Also notice (10^k+1)/11=9090...9091, with (k-1)/2 9's.

We only need to solve for k such that (10^k+1)^2 can be devided by 11^2=121.

This is easy, solong as 9*(k-1)/2-1 can be divided by 11.

The first k=11, the second k=11*13...

We need 0.1


With k, p, q=11, solutions for x are:
x=(10^k+1)*p^2/q^2.