A243016 Number of solutions for k*n/(k+n) = p for integer k > 0 and prime p.
0, 0, 1, 2, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1
Keywords
Examples
4*k/(4+k) has two solutions: k=4, p=2 and k=12, p=3. Thus a(4) = 2. From _Antti Karttunen_, Jan 18 2025: (Start) For n=3, the ratio (k*n)/(k+n) obtains for k=1..3*(3-1) the values 3/4, 6/5, 3/2, 12/7, 15/8, 2, and only the last one of these is prime, therefore a(3) = 1. For n=26, the only k such that (k*n)/(k+n) is a prime, is k=26, with (26^2)/(2*26) = 13, therefore a(26) = 1. (End)
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
Programs
-
PARI
A243016(n) = { my(s); sum(k=1, n*(n-1), s = (k*n)/(k+n); (1==denominator(s) && isprime(s))); }; \\ Edited by Antti Karttunen, Jan 18 2025
Formula
a(n) <= A063647(n). - Antti Karttunen, Jan 18 2025
Extensions
Data section extended up to a(105) and incorrect terms, that were caused by dropping of a(26) and a(27) (first discrepancies at n=26, 28, 30, 34, etc.) corrected by Antti Karttunen, Jan 18 2025
Comments