This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A384670 #20 Jun 28 2025 20:19:37 %S A384670 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, %T A384670 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, %U A384670 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 %N A384670 Smallest denominator y for which there exists an integer x with round(100*x/y) = n. %C A384670 We allow x=0 so that a(0)=1 is from round(100*0/1) = 0. %C A384670 If some published statistic shows n percent, and that percentage was made by rounding to the nearest integer (and 0.5 rounds upwards), then it must have been from a sample of at least a(n) things. %e A384670 For n=1, proportion 1/67 = 1.4992...% rounds to n=1 percent and 67 is the smallest denominator allowing that. %o A384670 (PARI) %o A384670 first(n) = { %o A384670 res = vector(n, i, oo); %o A384670 todo = 100; %o A384670 for(i = 1, 100, %o A384670 for(j = 1, i, %o A384670 c = round(100*j/i); %o A384670 if(0 < c && c <= n, %o A384670 if(res[c] == oo, %o A384670 todo--; %o A384670 if(todo == 0, %o A384670 break %o A384670 )); %o A384670 res[c] = min(res[c], i)))); %o A384670 for(i = 101, n, %o A384670 res[i] = res[i-100]); %o A384670 concat(1, res) %o A384670 } \\ _David A. Corneth_, Jun 23 2025 %o A384670 (Python) %o A384670 from itertools import count %o A384670 def A384670(n): %o A384670 for y in count(1): %o A384670 x, z = divmod(y*((n<<1)-1),200) %o A384670 if (200*(x+bool(z))+y)//(y<<1) == n: %o A384670 return y # _Chai Wah Wu_, Jun 28 2025 %Y A384670 Cf. A239525 (round either way). %K A384670 nonn,easy %O A384670 0,2 %A A384670 _James Beazley_, Jun 06 2025