login
A286334
The smallest number a such that there exists an integer b such that a/b is equal to n% rounded to the nearest percent.
0
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 3, 1, 3, 2, 3, 4, 1, 5, 3, 5, 2, 3, 4, 6, 1, 10, 6, 4, 7, 3, 7, 2, 7, 5, 3, 4, 5, 6, 7, 10, 17, 1, 18, 11, 8, 7, 6, 5, 4, 7, 10, 3, 11, 8, 5, 7, 11, 19, 2, 13, 9, 7, 5, 13, 8, 14, 3, 13, 10, 7, 11, 4, 13, 9, 5, 16, 11, 6, 13, 7, 8, 9, 10, 11, 13, 15, 18, 22, 28, 39, 66, 1
OFFSET
0,13
COMMENTS
a(n) is the smallest number of marks that gives you a mark of n% when rounded to the nearest percent.
a(n) is the smallest number a such that there exists an integer b such that a/b is equal to n% rounded to the nearest percent.
REFERENCES
D. Griller, Elastic Numbers, Rational Falcon, 37.
EXAMPLE
A mark of 1/20 is 5%, so a(5)=1.
A mark of 2/17 is 12% and 1/m doesn't give 12% for any m, so a(12)=2.
A mark of 3/19 is 16% and 1/m and 2/m don't give 16% for any m, so a(16)=3.
MATHEMATICA
r[n_] := If[EvenQ@ Floor[n], Round[n + 1] - 1, Round[n]]; {0}~Join~Table[Module[{a = 1, b = 2, m}, While[While[100 a/b > n, b++]; !MemberQ[Set[m, Map[r, 100 a/Range@ b]], n], a++]; {a, Position[m, n][[1, 1]]}], {n, 100}][[All, 1]] (* Michael De Vlieger, May 09 2017 *)
PROG
(Python) #
from __future__ import division
from math import floor
least = [None] * 101
i = 1
while None in least.values():
....for j in range(i+1):
........p = int(floor(100*j/i+.5))
........if least[p] is None:
............least[p] = j
....i += 1
print(least)
CROSSREFS
Sequence in context: A112757 A219794 A351469 * A118492 A079246 A309014
KEYWORD
nonn,fini,full
AUTHOR
Matthew Scroggs, May 07 2017
STATUS
approved