A173330 First of two intermediate sequences for integral solution of A002144(n)=x^2+y^2.
1, 10, 1, 5, 1, 5, 46, 5, 70, 5, 9, 1, 106, 106, 126, 142, 146, 13, 9, 186, 1, 214, 13, 226, 1, 13, 9, 5, 17, 13, 306, 9, 5, 17, 366, 17, 378, 1, 406, 406, 17, 442, 21, 442, 5, 510, 21, 538, 13, 1, 570, 5, 17, 598, 25, 13, 25, 650, 1, 5, 694, 706, 9, 742, 25, 17, 786, 5, 25
Offset: 1
Keywords
Examples
n=7: A002144(7) = 53 = 4*13 + 1, a(7) = 26! / (2*(13!)^2) mod 53 = 403291461126605635584000000/77551576087265280000 mod 53 = 5200300 mod 53 = 46, A002972(7) = MIN(46, 53 - 46) = 7; n=8: A002144(8) = 61 = 4*15 + 1, a(8) = 30! / (2*(15!)^2) mod 61 = 265252859812191058636308480000000/3420024505448398848000000 mod 61 = 77558760 mod 61 = 5, A002972(8) = MIN(5, 61 - 5) = 5.
References
- H. Davenport, The Higher Arithmetic (Cambridge University Press 7th ed., 1999), ch. V.3, p.122.
Formula
a(n) = (2k)! / 2(k!)^2 mod p, where p = 4*k+1 = A002144(n).
Comments