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

A231549 Least k>0 such that k!*n!+1 is a prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 4, 2, 8, 3, 3, 3, 4, 1, 2, 3, 5, 8, 4, 10, 2, 11, 9, 5, 5, 7, 3, 14, 18, 1, 40, 24, 5, 5, 18, 8, 20, 2, 49, 1, 3, 5, 28, 1, 17, 38, 27, 11, 16, 10, 3, 24, 270, 2, 45, 2, 15, 175, 64, 17, 6, 4, 3, 8, 18, 13, 17, 65, 32, 12, 7, 72, 13, 21, 33, 1, 24, 36, 76, 1
Offset: 1

Views

Author

Alex Ratushnyak, Nov 15 2013

Keywords

Comments

Indices of 1's: A002981.

Crossrefs

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[k!*n! + 1], k++]; k, {n, 100}] (* T. D. Noe, Nov 18 2013 *)

A238505 a(n) is the minimum number such that a(n)!/n! - 1 is prime (or 0 if no such number exists).

Original entry on oeis.org

3, 3, 3, 4, 6, 6, 9, 8, 10, 11, 12, 12, 14, 14, 16, 17, 19, 18, 20, 20, 22, 24, 25, 24, 41, 27, 30, 29, 34, 30, 32, 32, 42, 36, 36, 44, 39, 38, 40, 42, 42, 42, 46, 44, 46, 47, 49, 48, 52, 51, 58, 58, 54, 54, 56, 57, 59, 60, 60, 60, 71, 62, 65, 65, 66, 67, 71
Offset: 0

Views

Author

Lei Zhou, Feb 27 2014

Keywords

Comments

If a(n) = 0, all numbers m!/n! - 1 for integer m > n are composite.
Up to n = 2500, a(n) > 0.

Examples

			n = 1: 2!/1! - 1 = 1 is not prime, 3!/1! - 1 = 5 is prime.  So a(1) = 3;
n = 6: 7!/6! - 1 = 6, 8!/6! - 1 = 55, 9!/6! - 1 = 503.  6 and 55 are not prime.  503 is prime.  So a(6) = 9.
		

Crossrefs

Programs

  • Mathematica
    Table[i = n; a = n;  While[! PrimeQ[a - 1], i++; a = a*i]; i, {n, 1, 67}]
  • PARI
    a(n) = {m = n; while(! isprime(m!/n! -1), m++); m;} \\ Michel Marcus, Mar 06 2014
Showing 1-2 of 2 results.