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!)
A242916 Numbers n such that (k!+n)/(k+n) is prime for some k. 0

%I #31 Aug 16 2016 10:45:48

%S 1,6,11,16,34,110,113,351,586,708,839,1286,5026,6518,9404,10070,10154,

%T 10909,19382,19951,20148,23547

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

%C For all a(n) > 1, there is only one k that makes (k!+n)/(k+n) a prime (up to k <= 5000). For a(2) through a(11), they are given by {4, 6, 4, 12, 5, 6, 6, 12, 6, 44} respectively.

%C From _Robert Israel_, Aug 09 2016: (Start)

%C If n > 1 and (k!+n)/(k+n) is prime, we must have k < n.

%C Proof: if k >= n, then n | k! + n, so (after eliminating some small cases) for (k!+n)/(k+n) to be prime we need n | k+n and thus n | k. But if k = mn,

%C mn-1 >= m+1 so m+1 | (mn-1)!, and (k!+n)/(k+n)=(m(mn-1)!+1)/(m+1) is not an integer. (End)

%e (k!+6)/(k+6) is prime for some k (let k = 4). Thus 6 is a member of this sequence.

%p f:= proc(n) ormap(proc(k) local v; v:= (k!+n)/(k+n); v::integer and isprime(v) end proc, [$2..n-1]) end proc:

%p f(1):= true:

%p select(f, [$1..1500]); # _Robert Israel_, Aug 09 2016

%t fQ[n_] := Block[{k = 1}, While[k < n && !PrimeQ[(k! + n)/(k + n)], k++]; k < n]; k = 2; lst = {1}; While[k < 25001, If[fQ@k, Print@k; AppendTo[lst, k]]; k++]; lst (* _Robert G. Wilson v_, Aug 14 2016 *)

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

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

%Y Cf. A242565.

%K nonn,hard,more

%O 1,2

%A _Derek Orr_, May 26 2014

%E a(12)-a(15) from _Robert Israel_, Aug 09 2016

%E a(16)-a(21) from _Robert G. Wilson v_, Aug 11 2016

%E a(22) from _Robert G. Wilson v_, Aug 13 2016

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 July 21 20:15 EDT 2024. Contains 374475 sequences. (Running on oeis4.)