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.

A050299 Numbers k such that ((k-1)! + 1)/k is prime.

Original entry on oeis.org

1, 5, 7, 11, 29, 773, 1321, 2621
Offset: 1

Views

Author

N. J. A. Sloane, Apr 09 2003

Keywords

Comments

Except for the first term, all terms are primes because for n > 1, n divides (n-1)! + 1 iff n is prime. - Farideh Firoozbakht, Mar 19 2004
a(9) >= 30941.

Examples

			7 is in the sequence because (6!+1)/7=103 is prime.
		

Programs

  • Mathematica
    v={1};Do[If[PrimeQ[((Prime[n]-1)!+1)/Prime[n]], v=Append[v, Prime[n]];Print[v]], {n, 845}]
    Select[Range[2630],PrimeQ[((#-1)!+1)/#]&] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    is(n)=((n-1)!+1)%n==0 && isprime(((n-1)!+1)/n) \\ Anders Hellström, Nov 22 2015

Formula

((a(n)-1)! + 1)/a(n) = A122696(n) = A007619(A000720(A050299(n))) for n > 1. - Jonathan Sondow, Aug 07 2011
a(n) = prime(A225906(n-1)) for n > 1. - Jonathan Sondow, May 20 2013

Extensions

a(7)-a(8) from Mike Oakes, Aug 20 2003

A163212 Wilson quotients (A007619) which are primes.

Original entry on oeis.org

5, 103, 329891, 10513391193507374500051862069
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

a(5) = A007619(137), a(6) = A007619(216), a(7) = A007619(381).
Same as A122696 without its initial term 2. - Jonathan Sondow, May 19 2013

Examples

			The quotient (720+1)/7 = 103 is a Wilson quotient and a prime, so 103 is a member.
		

Crossrefs

Programs

  • Maple
    # WQ defined in A163210.
    A163212 := n -> select(isprime,WQ(factorial,p->1,n)):
  • Mathematica
    Select[Table[p = Prime[n]; ((p-1)!+1)/p, {n, 1, 15}], PrimeQ] (* Jean-François Alcover, Jun 28 2013 *)
  • PARI
    forprime(p=2, 1e4, a=((p-1)!+1)/p; if(ispseudoprime(a), print1(a, ", "))) \\ Felix Fröhlich, Aug 03 2014

Formula

a(n) = A122696(n+1) = A007619(A225906(n)) = ((A050299(n+1)-1)!+1)/A050299(n+1). - Jonathan Sondow, May 19 2013

A225906 Indices of primes whose Wilson quotients are also prime.

Original entry on oeis.org

3, 4, 5, 10, 137, 216, 381
Offset: 1

Views

Author

Jonathan Sondow, May 20 2013

Keywords

Comments

Is it a coincidence that the terms are alternately odd and even? Is it also a coincidence that the odd terms are all primes (= A225672)?

Examples

			The Wilson quotient of 7 is ((7-1)!+1)/7 = 103, which is prime, and 7 is the 4th prime, so 4 is a member.
		

Crossrefs

Formula

a(n) = A000720(A050299(n+1)).

A225672 Primes p such that the Wilson quotient of the p-th prime is also prime.

Original entry on oeis.org

3, 5, 137, 381
Offset: 1

Views

Author

Jonathan Sondow, May 20 2013

Keywords

Examples

			The 5th prime is 11 and the Wilson quotient of 11 is ((11-1)!+1)/11 = 329891, which is prime, so 5 is a term.
		

Crossrefs

Showing 1-4 of 4 results.