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.

A004055 ((p-1)/2)! mod p for odd primes p.

Original entry on oeis.org

1, 2, 6, 10, 5, 13, 18, 1, 12, 1, 31, 9, 42, 46, 23, 1, 11, 66, 1, 27, 78, 1, 34, 22, 91, 102, 1, 33, 15, 126, 130, 37, 1, 44, 1, 129, 162, 1, 80, 178, 162, 190, 81, 183, 198, 1, 1, 226, 122, 144, 1, 64, 1, 16, 262, 187, 1, 217, 53, 1, 138, 1, 1, 288, 114, 1, 189
Offset: 1

Views

Author

Jeffrey Shallit, Dec 11 1996

Keywords

Comments

Values 1 correspond to primes listed in A058302. - Max Alekseyev, Oct 24 2023

Crossrefs

Programs

  • Magma
    [Factorial((p-1) div 2) mod p: p in PrimesInInterval(3,350)]; // Vincenzo Librandi, May 01 2016
  • Maple
    a:= n-> (p-> ((p-1)/2)! mod p)(ithprime(n+1)):
    seq(a(n), n=1..73);  # Alois P. Heinz, Oct 25 2023
  • Mathematica
    Mod[((#-1)/2)!, #]& /@ Prime[Range[2, 100]] (* Jean-François Alcover, Jan 02 2025 *)
  • PARI
    lista(n)=forprime(p=3, n, print1(((p-1)/2)! % p, ", ")); \\ Michel Marcus, May 24 2013
    
  • PARI
    a(n,p=prime(n+1))=lift(prod(k=2,p\2,k,Mod(1,p))) \\ Charles R Greathouse IV, May 01 2016