The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A239412 Numbers n such that (n!-k)/(n-k) is prime for some k. 0

%I

%S 4,6,8,16,18,92,254,258,660,1850,2496,2774,2832,7430,28540,32124

%N Numbers n such that (n!-k)/(n-k) is prime for some k.

%C a(14) > 3000.

%C There is only one value of k that can work, and it is n/2. Thus, all members of the sequence are even.

%C Even numbers n such that 2*(n-1)!-1 is prime.

%C (Odd members of A076133) + 1. - _Robert Israel_, Aug 11 2016

%e (4!-k)/(4-k) is prime for some k (namely, k = 2). Thus, 4 is a member of this sequence.

%p select(t -> isprime(2*(t-1)!-1), [seq(q,q=2..1000, 2)]); # _Robert Israel_, Aug 11 2016

%t Select[Range[2, 10^3, 2], PrimeQ[2 (# - 1)! - 1] &] (* _Michael De Vlieger_, Aug 11 2016 *)

%o (PARI) a(n)=for(k=1,int(n/2),s=(n!-k)/(n-k);if(floor(s)==s,if(ispseudoprime(s),return(k))))

%o n=1;while(n<1000,if(a(n),print1(n,", "));n+=1)

%Y Cf. A076133.

%K nonn,hard,more

%O 1,1

%A _Derek Orr_, May 26 2014

%E Edited and a(14)-a(16) added by _Robert Israel_, Aug 11 2016

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

Last modified November 28 00:12 EST 2021. Contains 349395 sequences. (Running on oeis4.)