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”).

A242834
Least number k such that k*n/(k+n) is prime or 0 if no such k exists.
2
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, 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, 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
OFFSET
1,3
COMMENTS
Since the largest k where k*n/(k+n) is an integer is given by n*(n-1), a(n) = 0 is definite.
LINKS
EXAMPLE
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.
PROG
(PARI) a(n)=for(k=1, n*(n-1), s=(k*n)/(k+n); if(floor(s)==s, if(ispseudoprime(s), return(k))))
n=1; while(n<100, print(a(n)); n+=1)
(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
CROSSREFS
Sequence in context: A200020 A375254 A011487 * A010495 A111310 A190575
KEYWORD
nonn
AUTHOR
Derek Orr, May 27 2014
EXTENSIONS
Missing terms a(35) .. a(38) inserted by Antti Karttunen, Feb 18 2023
STATUS
approved