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 A239525 #76 Jun 28 2025 20:27:39 %S A239525 200,67,40,29,23,19,16,14,12,11,10,9,8,8,7,13,19,6,11,16,5,14,9,13,17, %T A239525 4,19,11,18,7,10,13,19,3,29,17,11,8,8,18,5,17,12,7,9,11,13,15,21,35,2, %U A239525 35,21,15,13,11,9,7,12,17,5,18,8,8,11,17,29,3,19,13,10,7,18,11,19,4,17,13,9,14,5,16,11,6,19,13,7,8,8,9,10,11,12,14,16,19,23,29,40,67,1 %N A239525 For 0 <= n <= 100, a(n) is smallest integer N such that some positive x/N rounds to n%, with x > 0. %C A239525 When the fractional part is 0.5, rounding in either direction is allowed. %C A239525 From _Jonathan Dushoff_, Feb 11 2025: (Start) %C A239525 The sequence arises when considering how to "reverse-engineer" published percentages: A quoted n percent means that proportion was within at least a total of a(n) things. %C A239525 Having a(n) based on rounding either way when mid-way between two integer percentages makes the terms agnostic as to what rounding was actually used in the published percentage. %C A239525 (End) %F A239525 Find the smallest N such that there is some x > 0 with abs(100*x/N - n) <= 0.5. %e A239525 a(31)=13 because 4/13 = 0.31 (to two digits after the decimal point). %t A239525 Table[LinearProgramming[{1, 0}, {{-n/100 + 0.005, 1}, {n/100 + 0.005, -1}}, {0, 0}, {1, 1}, Integers], {n, 0, 100}] // Transpose // First %o A239525 (Python) %o A239525 from itertools import count %o A239525 def A239525(n): %o A239525 for y in count(1): %o A239525 if not y*((n<<1)+1)%200: return y %o A239525 x, z = divmod(y*((n<<1)-1),200) %o A239525 if (a:=x+bool(z)) and (200*a+y)//(y<<1) == n: %o A239525 return y # _Chai Wah Wu_, Jun 28 2025 %Y A239525 Cf. A239526 (corresponding x). %K A239525 nonn,base,easy,fini,full %O A239525 0,1 %A A239525 _Patrick D McLean_, Mar 21 2014 %E A239525 Edited by _Jonathan Dushoff_, Apr 22 2022