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

A177013 a(n) is the smallest number m such that all the n numbers 1!*m-1, 2!*m-1, ..., n!*m-1 are prime.

Original entry on oeis.org

3, 3, 3, 3, 3, 1500, 1500, 154770, 1656252, 3240034842
Offset: 1

Views

Author

Enoch Haga and Farideh Firoozbakht, May 20 2010

Keywords

Examples

			a(5)=3 because all five numbers 1!*3-1, 2!*3-1, 3!*3-1, 4!*3-1 and 5!*3-1 are prime and 3 is the smallest such number.
The corresponding primes are:
n=1:  2;
n=2:  2, 5;
n=3:  2, 5, 17;
n=4:  2, 5, 17, 71;
n=5:  2, 5, 17, 71, 359;
n=6:  1499, 2999, 8999, 35999, 179999, 1079999;
n=7:  1499, 2999, 8999, 35999, 179999, 1079999, 7559999;
n=8:  154769, 309539, 928619, 3714479, 18572399, 111434399, 780040799, 6240326399;
...
		

Crossrefs

Cf. A177014.

Programs

  • PARI
    okm(m, n) = {for (k=1, n, if (! isprime(k!*m-1), return (0));); return (1);}
    a(n) = {m = 1; while(! okm(m, n), m++); m;} \\ Michel Marcus, Jun 08 2014
Showing 1-1 of 1 results.