All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Possible Percent Problems Part 4 (Posted on 2010-01-20)
a/b = b% when rounded to the nearest percent.

[1] What are the smallest 5 possible values of b?
[2] What is the largest value b cannot assume?

Now let us generalize the second part.

[3] Find the largest value of b where a/b cannot equal b when it is multiplied by 10^n and rounded to the nearest whole number. (Part [2] is n=2)
Solve for n = 1, 2, 3, 4, ...

 No Solution Yet Submitted by Jer Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions Comment 1 of 1

Part 1:

The five smallest possible values of b are 10, 14, 20, 30 and 33, as shown in the table below for the 47 smallest possible values of b.

DEFDBL A-Z

FOR b = 1 TO 10000
a0 = b * b / 100
a1 = INT(a0) ' int is floor function
a2 = -INT(-a0)  ' this results in ceiling
p1 = INT(100 * a1 / b + .5)
p2 = INT(100 * a2 / b + .5)
IF p1 = b THEN a = a1:  ELSE IF p2 = b THEN a = a2:  ELSE a = -1
IF a > 0 THEN
IF ct < 47 THEN PRINT a; b, 100 * a / b
ct = ct + 1
ELSE
END IF
NEXT b

` a   b             % 1  10        10 2  14        14.28571428571429 4  20        20 9  30        3011  33        33.3333333333333413  36        36.1111111111111116  40        4017  41        41.4634146341463421  46        45.6521739130434822  47        46.8085106382978823  48        47.9166666666666624  49        48.9795918367346925  50        5026  51        50.9803921568627427  52        51.9230769230769228  53        52.8301886792452829  54        53.703703703703730  55        54.5454545454545535  59        59.3220338983050936  60        6037  61        60.6557377049180340  63        63.4920634920634941  64        64.062542  65        64.6153846153846145  67        67.1641791044776146  68        67.6470588235294149  70        7052  72        72.2222222222222353  73        72.6027397260273955  74        74.3243243243243256  75        74.6666666666666758  76        76.3157894736842159  77        76.6233766233766361  78        78.205128205128264  80        8066  81        81.4814814814814867  82        81.7073170731707369  83        83.1325301204819372  85        84.7058823529411774  86        86.0465116279069876  87        87.3563218390804677  88        87.579  89        88.7640449438202281  90        9083  91        91.2087912087912185  92        92.3913043478260988  94        93.61702127659575`

Part 2:

The above program also produces the answer to part 2:

93

Beginnings of part 3:

`b1             62             933             9504             98425             995006             9992937             99977648             9999999`

The below program was stopped at this point as the answers had become meaningless as they had become limited by the internal limitations of the program, instituted for time purposes.

DEFDBL A-Z
CLS

mult = 10
FOR pwr = 1 TO 20
FOR b = 1 TO 10000000
a0 = b * b / mult
a1 = INT(a0) ' int is floor function
a2 = -INT(-a0)  ' this results in ceiling
p1 = INT(mult * a1 / b + .5)
p2 = INT(mult * a2 / b + .5)
IF p1 = b THEN a = a1:  ELSE IF p2 = b THEN a = a2:  ELSE a = -1
IF a > 0 THEN
REM nothing here
ELSE
END IF
NEXT b
mult = mult * 10
NEXT pwr

 Posted by Charlie on 2010-01-20 14:24:38

 Search: Search body:
Forums (0)