login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A093437 a(n) = largest prime of the form n!/k! + 1. 3

%I #16 Feb 08 2023 07:23:10

%S 2,2,3,7,13,61,31,2521,20161,15121,604801,39916801,3991681,3113510401,

%T 14529715201,54486432001,10461394944001,59281238016001,53353114214401,

%U 2,670442572801,8515157028618240001,9366672731480064001

%N a(n) = largest prime of the form n!/k! + 1.

%C Is 19 the largest n such that a(n) = 2? There are none for 19 < n <= 600. - _Robert Israel_, Jan 16 2017

%H Robert Israel, <a href="/A093437/b093437.txt">Table of n, a(n) for n = 0..466</a>

%e a(7) = 2521 because 7!/2! + 1 = 2521 is prime, whereas 7!/1! + 1 = 5041 = 71^2 is composite;

%e a(19) = 2 because the only prime of the form 19!/k! + 1 is 19!/19! + 1 = 2.

%p f:= proc(n) local k,x;

%p x:= n!;

%p for k from 2 do

%p if isprime(x+1) then return x+1 fi;

%p x:= x/k;

%p od

%p end proc:

%p map(f, [$0..40]); # _Robert Israel_, Jan 16 2017

%t a[n_] := Module[{k, x}, x = n!; For[k = 2, True, k++, If[PrimeQ[x+1], Return[x+1]]; x = x/k]];

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Feb 08 2023, after _Robert Israel_ *)

%Y Cf. A093621 (smallest k > 0 such that n!/k! + 1 is prime), A002981 (n! + 1 is prime), A088332 (primes of form n! + 1).

%K nonn

%O 0,1

%A _Amarnath Murthy_, Apr 01 2004

%E Corrected and extended by _Hugo Pfoertner_, Apr 06 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 08:42 EDT 2024. Contains 375284 sequences. (Running on oeis4.)