cp's OEIS Frontend

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.

A319304 Integers q for which f(q) = ((((q - 1)! + 1) / q) + 1) / (q + 1) is a prime number.

This page as a plain text file.
%I A319304 #38 Apr 19 2025 12:02:31
%S A319304 7,17,31,67,89
%N A319304 Integers q for which f(q) = ((((q - 1)! + 1) / q) + 1) / (q + 1) is a prime number.
%C A319304 f(89) is a 131-digit prime.
%C A319304 According to Wilson's theorem, f(q) can be an integer only if q is prime.
%C A319304 a(6) > 30000. - _Michael S. Branicky_, Apr 19 2025
%t A319304 Select[Prime[Range[100]], PrimeQ[((((# - 1)! + 1) / #) + 1) / (# + 1)] &] (* _Vincenzo Librandi_, Sep 21 2018 *)
%o A319304 (PARI) forprime(q=7, 89, my(p = ((((q - 1)! + 1) / q) + 1) / (q + 1)); if(ispseudoprime(p), print1(q, ", ")))
%o A319304 (Magma) [n: n in  [1..100] | IsPrime(n) and IsPrime((((Factorial(n-1)+1) div n)+1) div (n+1))]; // _Vincenzo Librandi_, Sep 21 2018
%Y A319304 Cf. A193447, A319224.
%K A319304 nonn,hard,more
%O A319304 1,1
%A A319304 _Rashid Naimi_, Sep 16 2018
%E A319304 1621 and 1699, which do not belong here, removed by _Rashid Naimi_, Mar 21 2019