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-4 of 4 results.

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
    

A055939 Primes p such that p | ((p-1)/2)! + 1.

Original entry on oeis.org

7, 11, 19, 43, 47, 67, 79, 103, 127, 131, 163, 179, 191, 199, 227, 263, 347, 367, 383, 419, 431, 443, 479, 491, 503, 523, 563, 571, 599, 607, 619, 631, 683, 691, 727, 739, 743, 787, 823, 839, 863, 887, 947, 991, 1019, 1051, 1087, 1091, 1123, 1151, 1187
Offset: 1

Views

Author

Robert G. Wilson v, Jul 22 2000

Keywords

Comments

p | (p-1)! +1 iff p is a prime (Wilson's theorem). Note: all of the above primes are congruent to 3 (mod 4).
All primes == 3 mod 4 are members of either A055939 or A058302. - Zak Seidov, Jan 16 2007

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.5.

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 1225 ], PrimeQ[ # ] && Mod[ ((# - 1)/2)! + 1, # ] == 0 & ]
    Select[Prime[Range[200]],Divisible[((#-1)/2)!+1,#]&] (* Harvey P. Dale, Dec 17 2014 *)

A366823 Primes p that divide gcd(2^k + 1, k! - 1) for some k other than (p-1)/2.

Original entry on oeis.org

521881, 774593, 4327489, 21764537, 28807001, 213833929
Offset: 1

Views

Author

Rustem Aidagulov and Max Alekseyev, Oct 24 2023

Keywords

Comments

Prime p divides gcd(2^k + 1, k! - 1) for k = (p-1)/2 iff p belongs to A058302 and p == 3 (mod 8).

Crossrefs

Cf. A058302, A366824 (possible values of k).

A152217 Primes p == 1 (mod 3) such that ((p-1)/3)! == 1 (mod p).

Original entry on oeis.org

3571, 4219, 13669, 25117, 55897, 89269, 102121, 170647, 231019, 246247, 251431
Offset: 1

Views

Author

Francois Brunault (brunault(AT)gmail.com), Nov 29 2008, Nov 30 2008

Keywords

Comments

The Wilson theorem states that p is prime if and only if (p-1)! = -1 (mod p). If p = 3 (mod 4) then ((p-1)/2)! = +/- 1 (mod p).

Examples

			For n = 1 the prime a(1) = 3571 divides 1190! - 1.
		

References

  • J. B. Cosgrave, A Mersenne-Wieferich Odyssey, Manuscript, May 2022. See Section 18.2.

Crossrefs

Seems to be a subsequence of A002407 and therefore of A003215 (differences of consecutive cubes). See also A058302 and A055939 for the sequences corresponding to ((p-1)/2)! = +/- 1 (mod p).

Programs

  • PARI
    forprime(p=2,30000,if(p%3==1 & ((p-1)/3)!%p==1,print(p)))
Showing 1-4 of 4 results.