A384670 Smallest denominator y for which there exists an integer x with round(100*x/y) = n.
1, 67, 41, 29, 23, 19, 16, 14, 12, 11, 10, 9, 17, 8, 7, 13, 19, 6, 11, 16, 5, 14, 9, 13, 17, 4, 19, 11, 18, 7, 10, 13, 19, 3, 29, 17, 11, 19, 8, 18, 5, 17, 12, 7, 9, 11, 13, 15, 21, 35, 2, 35, 21, 15, 13, 11, 9, 7, 12, 17, 5, 18, 13, 8, 11, 17, 29, 3, 19, 13, 10, 7, 18, 11, 19, 4, 17, 13, 9, 14, 5, 16, 11, 6, 19, 13, 7, 15, 8, 9, 10, 11, 12, 14, 16, 19, 23, 29, 40, 67, 1
Offset: 0
Examples
For n=1, proportion 1/67 = 1.4992...% rounds to n=1 percent and 67 is the smallest denominator allowing that.
Crossrefs
Cf. A239525 (round either way).
Programs
-
PARI
first(n) = { res = vector(n, i, oo); todo = 100; for(i = 1, 100, for(j = 1, i, c = round(100*j/i); if(0 < c && c <= n, if(res[c] == oo, todo--; if(todo == 0, break )); res[c] = min(res[c], i)))); for(i = 101, n, res[i] = res[i-100]); concat(1, res) } \\ David A. Corneth, Jun 23 2025
-
Python
from itertools import count def A384670(n): for y in count(1): x, z = divmod(y*((n<<1)-1),200) if (200*(x+bool(z))+y)//(y<<1) == n: return y # Chai Wah Wu, Jun 28 2025
Comments