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.

Previous Showing 21-30 of 41 results. Next

A163211 Swinging Wilson quotients (A163210) which are primes.

Original entry on oeis.org

3, 23, 71, 757, 30671, 1383331, 245273927, 3362110459, 107752663194272623, 5117886516250502670227, 34633371587745726679416744736000996167729085703, 114326045625240879227044995173712991937709388241980425799
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

a(14)-a(18) certified prime by Primo 4.2.0. a(17) = A163210(569) = P1239, a(18) = A163210(787) = P1812. - Charles R Greathouse IV, Dec 11 2016

Examples

			The quotient (252+1)/11 = 23 is a swinging Wilson quotient and a prime, so 23 is a member.
		

Crossrefs

Programs

  • Maple
    A163211 := n -> select(isprime,A163210(n));
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; a[n_] := (p = Prime[n]; (sf[p - 1] + (-1)^Floor[(p + 2)/2])/p); Select[PrimeQ][Table[a[n], {n, 1, 100}]] (* G. C. Greubel, Dec 10 2016 *)
  • PARI
    sf(n)=n!/(n\2)!^2
    forprime(p=2,1e3, t=sf(p-1)\/p; if(isprime(t), print1(t", "))) \\ Charles R Greathouse IV, Dec 11 2016

A222207 Morley quotients: (2^(2*p-2) - (-1)^((p-1)/2)*binomial(p-1,(p-1)/2)) / p^3, where p = prime(n) and n >= 3.

Original entry on oeis.org

2, 12, 788, 7636, 874202, 10018884, 1445893544, 2954512034024, 38700329118256, 93229749133527532, 17540746936557672236, 243284404062970619608, 47694250379410432495952, 136236017676683906365850456, 404504597532158799519693872144, 5856120097210409121404621878992, 18102352585707069737371994385420772, 3894254646848417473467131712404310728
Offset: 3

Views

Author

Jonathan Sondow, Feb 22 2013

Keywords

Comments

Morley (1894/95) proved 2^(2*p-2) == (-1)^((p-1)/2)*binomial(p-1,(p-1)/2) mod p^3 for all primes p > 3.
Morley quotients are even, since 2^(2*p-2) and binomial(p-1,(p-1)/2) are even and p^3 is odd.

Examples

			prime(3) = 5, so a(3) = (2^(2*5-2) - (-1)^((5-1)/2)*binomial(5-1,(5-1)/2))/5^3 = (2^8 - binomial(4,2))/5^3 = (256-6)/125 = 2.
		

Crossrefs

Programs

  • Mathematica
    m[p_] := (2^(2*p-2) - (-1)^((p-1)/2)*Binomial[p-1, (p-1)/2])/p^3; Table[ m[ Prime[n]], {n, 3, 20}]

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)).

A239564 a(n) = (round(c^prime(n)) - 1)/prime(n), where c is the pentanacci constant (A103814).

Original entry on oeis.org

154, 504, 5758, 19912, 245714, 11251030, 40679232, 1967728552, 26525975822, 97753187576, 1335948880418, 68398141417510, 3547322151373882, 13260715720748120, 697034813138756392, 9825603574709578482, 36935066391752894480, 1970457739485406707872
Offset: 5

Views

Author

Keywords

Comments

For n>=5, round(c^prime(n)) == 1 (mod 2*prime(n)). Proof in Shevelev link. In particular, all terms are even.

Crossrefs

A292691 a(n) = C(A001359(n)), n >= 1, with C(n) = (4*((n-1)! + 1) + n)/(n*(n+2)) for n >= 2.

Original entry on oeis.org

1, 3, 101505, 259105757127, 1356566605613854774200240267, 1851197466245939272480116323530608949000567215
Offset: 1

Views

Author

Jaime Gómez, Sep 20 2017

Keywords

Comments

Clement's criterion for twin primes is, for integers with n >= 2: n and n + 2 are both primes if and only if 4*((n-1)! + 1) + n == 0 (mod n*(n+2)). See the Clement and Ribenboim links. Like the criteron for primality using Theorem 81 of Hardy and Wright, p. 69, it "is of course quite useless as a practical test".
a(n) is an integer because of the necessary part of this twin prime criterion.
Thanks to Wolfdieter Lang for comments and helpful advice.

Examples

			a(2) = 3, because A001359(2) = 5 and C(5) = (4*(4! + 1) + 5)/(5*7) = 3.
a(2) = 3 because A014574(2) = 6 and delta(6) = (4*4! + 6 + 3)/35 = 3.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford Science Publications, 1979.
  • P. Ribenboim, The New Book of Prime Number Records, Springer-Verlag NY 1996, pp. 259-260 (a proof of Clement's theorem).

Crossrefs

Programs

  • Mathematica
    p1[1] = 3; p1[n_] := p1[n] = (p = NextPrime[p1[n-1]]; While[!PrimeQ[p + 2], p = NextPrime[p]]; p);
    a[n_] := (4*((p1[n] - 1)! + 1) + p1[n])/(p1[n]*(p1[n] + 2));
    Array[a, 6] (* Jean-François Alcover, Nov 04 2017 *)
  • PARI
    c(n) = (4*(n - 2)! + n + 3) / (n^2 - 1);
    lista(nn) = forprime(p=2, nn, if (isprime(p+2), print1(c(p+1), ", "));); \\ Michel Marcus, Sep 21 2017
  • Python
    # Python version 2.7
    import math
    from sympy import *
    list = []
    n = 3
    l = 1   # parameter that indicates the desired length of the list
    x = 1
    while x <= l:
           y = (4*factorial(n-2))+n+3
           z = n**2 - 1
           if y % z == 0:
                  print (y/z)
                  list.append(y/z)
           n+=1
           x+=1
    

Formula

a(n) = (4*((p1(n)-1)! + 1) + p1(n))/(p1(n)*(p1(n) + 2)) with p1(n) = A001359(n), for n >= 1. See the name.
From Wilson's theorem (see Hardy and Wright, Theorem 80, p. 68), a(n) = (4*kp1(n) + 1)/(p1(n) + 2) with p1(n) = A000359(n) and kp1(n) = A007619(p1(n)).
a(n) = delta(A014574(n)) with delta(n) = (4*(n-2)!+ n + 3)/(n^2 - 1).
delta(n) ~ ((4*(n-2)^(n - 2)* sqrt(2*Pi*(n - 2))) / (e^(n - 2)*(n^2 - 1)))+((n + 3) / (n^2 - 1)) for large n-values (using Stirling's approximation for n!).

Extensions

Edited by Wolfdieter Lang, Oct 25 2017

A091330 a(n) = ((p-1)!/p) - ((p-1)*(p-1)!/p!), where p is the n-th prime.

Original entry on oeis.org

0, 0, 4, 102, 329890, 36846276, 1230752346352, 336967037143578, 48869596859895986086, 10513391193507374500051862068, 8556543864909388988268015483870, 10053873697024357228864849950022572972972
Offset: 1

Views

Author

Russell Easterly, Mar 01 2004

Keywords

Comments

Related to Wilson's Theorem. Let p be a prime number and write 1/p - (p-1)/p! = x/(p-1)!. Then x = (p-1)!/p - (p-1)*(p-1)!/p! = (p-1)!/p - (p-1)/p.
Also, a(n) = floor((p-1)!/p). [Bruno Berselli, May 31 2013]
If b(1)=1, and b(m) = ((m-1)^2 / m) *(b(m-1)+(m-3)/(m-1)) for m>1, then a(n) are the terms of b(m) for m prime. [Pedro Caceres, Dec 30 2018]

Examples

			Prime(4)=7 so a(4) = 6!/7 - 6*6!/7! = 102
		

Crossrefs

Cf. A007619.

Programs

  • Mathematica
    A091330[n_] := Block[{p = Prime[n]}, ((p - 1)!/p) - ((p - 1)*(p - 1)!/p!)] (* Robert G. Wilson v, Mar 02 2004 *)

Extensions

More terms from Robert G. Wilson v and Ray Chandler, Mar 02 2004

A152413 Generalized Wilson primes of order 17; or primes p such that p^2 divides 16!(p-17)! + 1.

Original entry on oeis.org

61, 251, 479
Offset: 1

Views

Author

Alexander Adamchuk, Dec 03 2008

Keywords

Comments

Wilson's theorem states that (p-1)! == -1 (mod p) for every prime p. Wilson primes are the primes p such that p^2 divides (p-1)! + 1. They are listed in A007540. Wilson's theorem can be expressed in general as (n-1)!(p-n)! == (-1)^n (mod p) for every prime p >= n. Generalized Wilson primes order n are the primes p such that p^2 divides (n-1)!(p-n)! - (-1)^n.
Alternatively, prime p=prime(k) is a generalized Wilson prime order n iff A002068(k) == A007619(k) == H(n-1) (mod p), where H(n-1) = A001008(n-1)/A002805(n-1) is (n-1)-st harmonic number. For this sequence (n=17), it reduces to A002068(k) == A007619(k) == 2436559/720720 (mod p).

Crossrefs

Extensions

Edited by Max Alekseyev, Jan 28 2012

A193447 a(n) = ((p - 2)! + p - 1)/(p*(p - 1)) where p is the n-th prime.

Original entry on oeis.org

3, 3299, 255877, 4807626353, 1040021719579, 100970241446066087, 13409937746820630739862069, 9507270961010432209186683871, 7757618593382991688938927430572972973, 12437732976339904486975781548721278876097561, 18522993694996570934756402022946152638511627907
Offset: 4

Views

Author

Alzhekeyev Ascar M, Jul 26 2011

Keywords

Comments

Conjecture: for k >= 7, ((k - 2)! + k - 1)/(k*(k - 1)) is an integer iff k is prime.
Proof follows from Wilson's theorem. - Alois P. Heinz, Aug 07 2011
Note that a(1) = 1 is also an integer. - Jianing Song, Sep 17 2018

Examples

			a(4) = (5! + 6)/(7*6) = 126/42 = 3.
a(5) = (9! + 10)/(11*10) = 362890/110 = 3299.
		

Crossrefs

Programs

  • PARI
    a(n) = my(p=prime(n)); ((p-2)!+p-1)/(p*(p-1)) \\ Jianing Song, Sep 17 2018

Extensions

Name clarified by Jianing Song, Sep 17 2018

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

A239565 (Round(c^prime(n)) - 1)/prime(n), where c is the hexanacci constant (A118427).

Original entry on oeis.org

6702, 23594, 301738, 14576792, 53653610, 2738173594, 38254296398, 143514673148, 2032676550562, 109797468019174, 6007838407290514, 22863415355711030, 1267938526864061370, 18523200405015238420, 70884650213591098558, 3989789924439684599434
Offset: 7

Views

Author

Keywords

Comments

For n>=7, round(c^prime(n)) == 1 (mod 2*prime(n)). Proof in Shevelev link. In particular, all terms are even.

Crossrefs

Previous Showing 21-30 of 41 results. Next