Next note that 999999 divides 40!. This is because 999999 = 9*111111 = 9*111*1001 = 9*3*37*11*91 = 27*7*11*13*37. Since 999999 = 106 - 1, it follows that if we group the digits of 40! in sets of six starting from the units digit and working right to left, then the sum of these digits will be divisible by 999999. Therefore abcdef + 283247 + 897734 + 345611 + 269596 + 115894 + 272000 is divisible by 999999, that is
eacos b | = 1 + a | |
easin b | = b. |
Remark It can be shown that p≈2.09 and q≈7.46.