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

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

Original entry on oeis.org

2, 9, 57, 495, 5700, 82201, 1419761, 28501117, 651233662, 16676686697, 472883843993, 14705395791307, 497538872883728, 18193397941038737, 714950006521386977, 30046260016074301945, 1344648068888240941018
Offset: 1

Views

Author

Alexander Adamchuk, Dec 14 2006

Keywords

Comments

p divides a(p) and a(p-1) for prime p.
p^2 divides a(p) for prime p in {5, 13, 563, ...} which seems to coincide with the Wilson primes (A007540).
p^2 divides a(p-1) for prime p in {3, 11, 107, ...} which seems to coincide with the odd primes in A079853.

Crossrefs

Programs

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

Formula

a(n) = 1 + Sum_{i=1..n} Sum_{j=1..n} i^j.
a(n) = n + 1 + Sum_{j=2..n} j*(j^n - 1)/(j-1).
a(n) = A086787(n) + 1.

Extensions

Edited by Max Alekseyev, Jan 29 2012

A300898 Primes p such that p# + 4 is divisible by the next prime after p.

Original entry on oeis.org

2, 3, 11, 107
Offset: 1

Views

Author

Chai Wah Wu, Mar 14 2018

Keywords

Comments

p# is the primorial as defined in A002110. First 4 terms coincide with A079853.
a(5) > prime(1.4*10^6) = 22182343. - Robert Price, Apr 02 2018

Crossrefs

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

A282063 A(n, k) = k-th Wilson prime p of order n with p >= n and k running over the positive integers. Square array read by antidiagonals.

Original entry on oeis.org

5, 13, 2, 563, 3, 7
Offset: 1

Views

Author

Felix Fröhlich, Feb 05 2017

Keywords

Comments

A Wilson prime of order n is a prime p such that (n-1)!*(p-n)!-(-1)^n == 0 (modulo p^2).

Examples

			Array A(n, k) starts:
      5,   13,  563
      2,    3,   11,  107, 4931
      7
  10429
      5,    7,   47
     11
		

Crossrefs

Cf. A007540 (row 1), A079853 (row 2), A152413 (row 17), A128666 (column 1).

Programs

  • PARI
    is_wilson(n, order) = Mod((order-1)!*(n-order)!-(-1)^order, n^2)==0
    table(rows, cols) = for(x=1, rows, my(i=0); forprime(p=x, , if(is_wilson(p, x), print1(p, ", "); i++; if(i==cols, print(""); break))))
    table(4, 3) \\ print initial 4 rows and 3 columns of table
Showing 1-5 of 5 results.