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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

7, 11, 19, 61, 2557
Offset: 1

Views

Author

Rashid Naimi, Sep 13 2018

Keywords

Comments

For q < 7, f(q) is not an integer.
f(q) for q = 2557 is a PRP7592.
According to Wilson's theorem, f(q) can be an integer only if q is prime.
a(6) > 30000. - Michael S. Branicky, Apr 18 2025

Crossrefs

Programs

  • Mathematica
    a[q_]:=If[PrimeQ[((((q - 2)! - 1) / q) - 1) / (q + 1)], q]; DeleteCases[Array[a, 100], Null] (* Stefano Spezia, Nov 04 2018 *)
  • PARI
    forprime(q=7, 2557, my(p = ((((q - 2)! - 1) / q) - 1) / (q + 1)); if(ispseudoprime(p), print1(q, ", ")))

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

Original entry on oeis.org

7, 17, 31, 67, 89
Offset: 1

Views

Author

Rashid Naimi, Sep 16 2018

Keywords

Comments

f(89) is a 131-digit prime.
According to Wilson's theorem, f(q) can be an integer only if q is prime.
a(6) > 30000. - Michael S. Branicky, Apr 19 2025

Crossrefs

Programs

  • 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
  • Mathematica
    Select[Prime[Range[100]], PrimeQ[((((# - 1)! + 1) / #) + 1) / (# + 1)] &] (* Vincenzo Librandi, Sep 21 2018 *)
  • PARI
    forprime(q=7, 89, my(p = ((((q - 1)! + 1) / q) + 1) / (q + 1)); if(ispseudoprime(p), print1(q, ", ")))
    

Extensions

1621 and 1699, which do not belong here, removed by Rashid Naimi, Mar 21 2019
Showing 1-2 of 2 results.