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.

A084730 Smallest prime of the form k*n! - 1.

Original entry on oeis.org

2, 3, 5, 23, 239, 719, 5039, 201599, 1088639, 14515199, 159667199, 479001599, 31135103999, 87178291199, 2615348735999, 188305108991999, 711374856191999, 192071211171839999, 3649353012264959999, 12164510040883199999, 2248001455555215359999, 2248001455555215359999
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 13 2003

Keywords

Examples

			a(8) = 161599 = 4*8! - 1 is a prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local w,k;
    w:= n!;
    for k from 1 do
      if isprime(k*w-1) then return k*w-1 fi
    od
    end proc:
    map(f, [$1..30]); # Robert Israel, Nov 23 2023
  • Mathematica
    Do[k = 1; While[ !PrimeQ[k*n! - 1], k++ ]; Print[k*n! - 1], {n, 2, 20}]
  • PARI
    a(n)=if(n<1,0,k=1; while(isprime(k*n!-1)==0,k++); k*n!-1)

Formula

a(n) = A083663(n)*n! - 1 = A038700(n!). - Robert Israel, Nov 23 2023

Extensions

Corrected and extended by Benoit Cloitre, Jun 14 2003