Volume 6. Mathematical Concepts and Methods
1 #include <stdio.h> 2 //(2n+1)^2 - 8m^2 = 1,佩尔函数,或者打表 3 int main() { 4 int count = 0; 5 int x1 = 3, xi = 3, y1= 1, yi = 1, n = 8, txi; 6 while (count++ < 10) 7 { 8 txi = xi; 9 xi = x1 * xi + n * y1 * yi; 10 yi = x1 * yi + y1 * txi; 11 printf("%10d%10d\n", yi, (xi - 1) / 2); 12 } 13 return 0; 14 }