This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A277167 #21 Aug 01 2017 02:55:05 %S A277167 3,11,31,47,53 %N A277167 Prime numbers p such that (-1)^h + (h!)^2 == 0 (mod p^2) where h = (p-1)/2. %C A277167 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 A277167 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 A277167 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 A277167 G. B. Mathews, Theory of Numbers, part 1 [all published] (Cambridge, 1892), 318. %H A277167 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 A277167 (-1)^((11-1)/2)+(((11-1)/2)!)^2 = 14399 = 7*11^2*17. %o A277167 (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 A277167 Cf. A007540, A089043. %K A277167 nonn,hard,more %O A277167 1,1 %A A277167 _René Gy_, Oct 01 2016