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

A128666 Least generalized Wilson prime p such that p^2 divides (n-1)!(p-n)! - (-1)^n; or 0 if no such prime exists.

Original entry on oeis.org

5, 2, 7, 10429, 5, 11, 17
Offset: 1

Views

Author

Alexander Adamchuk, Mar 25 2007

Keywords

Comments

Conjecture: a(n)>0 for all n.
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 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.
Generalized Wilson primes of order 2 are listed in A079853. Generalized Wilson primes of order 17 are listed in A152413.
a(9)-a(11) = {541,11,17}.
a(13) = 13.
a(15)-a(21) = {349, 31, 61, 13151527, 71, 59, 217369}.
a(24) = 47.
a(26)-a(28) = {97579, 53, 347}.
a(30)-a(37) = {137, 20981, 71, 823, 149, 71, 4902101, 71}.
a(39)-a(45) = {491, 59, 977, 1192679, 47, 3307, 61}.
a(47) = 14197.
a(49) = 149.
a(51) = 3712567.
a(53)-a(65) = {71, 2887, 137, 35677, 467, 443, 636533, 17257, 2887, 80779, 173, 237487, 1013}.
a(67)-a(76) = {523, 373, 2341, 359, 409, 14273449, 5651, 7993, 28411, 419}.
a(78) = 227.
a(80)-a(81) = {33619,173}.
a(83) = 137.
a(85)-a(86) = {983, 6601909}.
a(88) = 859.
a(90) = 2267.
a(92)-a(94) = {1489,173,6970961}.
a(97) = 453161
a(100) = 4201.
For n<100, a(n) > 1.4*10^7 is currently not known for n in { 8, 12, 14, 22, 23, 25, 29, 31, 38, 46, 48, 50, 52, 66, 77, 79, 82, 84, 87, 89, 91, 95, 96, 98, 99 }.

Crossrefs

Formula

If it exists, a(n) >= n. a(n) = n for n in {2, 5, 13, 563, ...} = the union of prime 2 and Wilson primes A007540.

Extensions

Edited and updated by Alexander Adamchuk, Nov 06 2010
Edited and a(18), a(21), a(26), a(36), a(42), a(51), a(59), a(62), a(64), a(72), a(86), a(94), a(97) added by Max Alekseyev, Jan 29 2012
Edited by M. F. Hasler, Dec 31 2015

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

A133298 a(n) = 1 + Sum_{i=1..n} Sum_{j=1..n} Sum_{k=1..n} i^(j+k).

Original entry on oeis.org

2, 41, 1727, 130917, 17245160, 3546873073, 1046002784253, 417182980579609, 215861313302976046, 140463714074395109081, 112191246261394235358555, 107867952671976721983260413, 122856922623618324408724634164
Offset: 1

Views

Author

Alexander Adamchuk, Oct 17 2007

Keywords

Comments

p divides a(p) for prime p>3. p^2 divides a(p) for prime p=7. Nonprime n dividing a(n) are {1,15}.

Crossrefs

Programs

  • GAP
    List([1..20], n-> 1 + n^2 + Sum([2..n], j-> (j*(j^n-1)/(j-1))^2) ); # G. C. Greubel, Aug 02 2019
  • Magma
    [2] cat [1+n^2 + (&+[(j*(j^n-1)/(j-1))^2: j in [2..n]]): n in [1..20]]; // G. C. Greubel, Aug 02 2019
    
  • Mathematica
    Table[Sum[(i(i^n-1)/(i-1))^2, {i,2,n}] +n^2 +1,{n,20}]
  • PARI
    vector(20, n, 1+n^2 + sum(j=2,n, (j*(j^n-1)/(j-1))^2)) \\ G. C. Greubel, Aug 02 2019
    
  • Sage
    [1+n^2 + sum((j*(j^n-1)/(j-1))^2 for j in (2..n)) for n in (1..20)] # G. C. Greubel, Aug 02 2019
    

Formula

a(n) = 1 + Sum_{i=1..n} Sum_{j=1..n} Sum_{k=1..n} i^(j+k).
a(n) = 1 + n^2 + Sum_{j=2..n} (j*(j^n - 1)/(j-1))^2.
Showing 1-3 of 3 results.