%I #21 Aug 01 2017 02:55:05
%S 3,11,31,47,53
%N Prime numbers p such that (-1)^h + (h!)^2 == 0 (mod p^2) where h = (p-1)/2.
%C The above congruence is true modulo p for all odd primes. See A089043. But like for Wilson congruence, it is true modulo p^2, for a restricted number of primes. After 53, the next one (if any) seems very far away (>500000).
%C The fact that the congruence is true modulo p for all odd primes was proved by Lagrange in 1771. Using a theorem of Mathews (1892) and Eisenstein's logarithmetic rule for the Fermat quotient, the condition stated in the definition can be restated as W_p == -2q_p(2) (mod p), where W_p is the Wilson quotient of p (A007619) and q_p(2) is the Fermat quotient of p, base 2 (A007663). - _John Blythe Dobson_, Jul 31 2017
%D Lagrange, "Démonstration d’un théoreme nouveau concernant les nombres premiers," Nouveaux Mémoires de l’Académie Royale des Sciences et Belles-Lettres [de Berlin], année 1771 (published 1783), 125-137.
%D G. B. Mathews, Theory of Numbers, part 1 [all published] (Cambridge, 1892), 318.
%H René Gy, <a href="https://math.stackexchange.com/questions/1949691/find-the-next-wilson-like-prime/2359369#2359369">Find the next "Wilson-like" prime</a>.
%e (-1)^((11-1)/2)+(((11-1)/2)!)^2 = 14399 = 7*11^2*17.
%o (PARI) lista(nn) = forprime(p=3, nn, if ((((-1)^((p-1)/2)+(((p-1)/2)!)^2) % p^2) == 0, print1(p, ", "))); \\ _Michel Marcus_, Oct 02 2016
%Y Cf. A007540, A089043.
%K nonn,hard,more
%O 1,1
%A _René Gy_, Oct 01 2016
|