login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Least number k such that k*n/(k+n) is prime or 0 if no such k exists.
2

%I #16 Feb 18 2023 08:09:08

%S 0,0,6,4,0,3,0,56,0,10,0,4,0,14,0,0,0,306,0,380,0,22,0,552,0,26,0,0,0,

%T 6,0,992,0,34,0,0,0,38,0,0,0,1722,0,1892,0,46,0,2256,0,0,0,0,0,2862,0,

%U 8,0,58,0,3540,0,62,0,0,0,0,0,4556,0,0,0,5112,0,74,0,0,0,0,0,6320,0,82,0,6972

%N Least number k such that k*n/(k+n) is prime or 0 if no such k exists.

%C Since the largest k where k*n/(k+n) is an integer is given by n*(n-1), a(n) = 0 is definite.

%H Antti Karttunen, <a href="/A242834/b242834.txt">Table of n, a(n) for n = 1..10080</a>

%e 1*3/(1+3) = 3/4 is not prime. 2*3/(2+3) = 6/5 is not prime. 3*3/(3+3) = 9/6 is not prime. 4*3/(4+3) = 12/7 is not prime. 5*3/(5+3) = 15/8 is not prime. 6*3/(6+3) = 2 is prime. Thus, a(3) = 6.

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

%o n=1;while(n<100,print(a(n));n+=1)

%o (PARI) A242834(n) = { for(k=1, n*(n-1), if(!((k*n)%(k+n)) && isprime((k*n)/(k+n)), return(k))); (0); }; \\ _Antti Karttunen_, Feb 18 2023

%Y Cf. A002378, A242931.

%K nonn

%O 1,3

%A _Derek Orr_, May 27 2014

%E Missing terms a(35) .. a(38) inserted by _Antti Karttunen_, Feb 18 2023