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

Home > Just Math
Celsius = 1/Fahrenheit (Posted on 2013-02-05) Difficulty: 3 of 5
If p/q degrees Celsius = q/p degrees Fahrenheit (p and q are positive), then determine the minimum positive integer value of p such that:

The base ten expansion of q is an integer if rounded to two decimal places.
To three decimal places?

Note:
To convert from degrees Fahrenheit to Celsius, subtract 32 then multiply by 5/9. To convert the other way, simply do the opposite (multiply by 9/5 and add 32). Ignore leading zeroes.

No Solution Yet Submitted by K Sengupta    
No Rating

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

DEFDBL A-Z
CLS
FOR p = 1 TO 13000
  q = 40
  DO
    prq = q
    q = p * (p / q * 9 / 5 + 32)
  LOOP UNTIL ABS((prq - q) / q) < .00000000000001#
  qround2 = INT(100 * q + .5) / 100
  IF INT(qround2) = qround2 THEN
    PRINT USING "##### ######.##### ######.## ######.### ######.####"; p; q; q; q; q
    ct = ct + 1
    IF ct MOD 40 = 0 THEN PRINT : DO: LOOP UNTIL INKEY$ > ""
  END IF
NEXT p

produces the table that follows.

The first instance of q being within .005 of an integer is p/q = 89/2852.99748, which represents Celsius temperature of about .031195 or Fahrenheit 32.056 (and all the results are in this vicinity).

As the table shows the second-part answer as being at p = 1585 where q = 50809.00008, or, rounded, 50809.000. This is almost, but not quite, good enough for the next level.

The table was extended far enough to include p = 12306, q = 394482.99998, or 394483.0000, rounded to 4 places after the decimal point.

        5-decimal             rounded q
   p        q         2-dec      3-dec      4-dec
   89   2852.99748   2853.00   2852.997   2852.9975
  285   9136.00317   9136.00   9136.003   9136.0032
  374  11989.00065  11989.00  11989.001  11989.0006
  463  14841.99813  14842.00  14841.998  14841.9981
  552  17694.99561  17695.00  17694.996  17694.9956
  659  21125.00382  21125.00  21125.004  21125.0038
  748  23978.00130  23978.00  23978.001  23978.0013
  837  26830.99878  26831.00  26830.999  26830.9988
  926  29683.99626  29684.00  29683.996  29683.9963
 1033  33114.00447  33114.00  33114.004  33114.0045
 1122  35967.00195  35967.00  35967.002  35967.0019
 1211  38819.99943  38820.00  38819.999  38819.9994
 1300  41672.99691  41673.00  41672.997  41672.9969
 1496  47956.00260  47956.00  47956.003  47956.0026
 1585  50809.00008  50809.00  50809.000  50809.0001
 1674  53661.99756  53662.00  53661.998  53661.9976
 1763  56514.99504  56515.00  56514.995  56514.9950
 1870  59945.00325  59945.00  59945.003  59945.0032
 1959  62798.00073  62798.00  62798.001  62798.0007
 2048  65650.99821  65651.00  65650.998  65650.9982
 2137  68503.99569  68504.00  68503.996  68503.9957
 2244  71934.00390  71934.00  71934.004  71934.0039
 2333  74787.00138  74787.00  74787.001  74787.0014
 2422  77639.99886  77640.00  77639.999  77639.9989
 2511  80492.99634  80493.00  80492.996  80492.9963
 2618  83923.00455  83923.00  83923.005  83923.0045
 2707  86776.00203  86776.00  86776.002  86776.0020
 2796  89628.99951  89629.00  89629.000  89628.9995
 2885  92481.99699  92482.00  92481.997  92481.9970
 3081  98765.00268  98765.00  98765.003  98765.0027
 3170 101618.00016 101618.00 101618.000 101618.0002
 3259 104470.99764 104471.00 104470.998 104470.9976
 3348 107323.99512 107324.00 107323.995 107323.9951
 3455 110754.00333 110754.00 110754.003 110754.0033
 3544 113607.00081 113607.00 113607.001 113607.0008
 3633 116459.99829 116460.00 116459.998 116459.9983
 3722 119312.99577 119313.00 119312.996 119312.9958
 3829 122743.00398 122743.00 122743.004 122743.0040
 3918 125596.00146 125596.00 125596.001 125596.0015
 4007 128448.99894 128449.00 128448.999 128448.9989
 4096 131301.99642 131302.00 131301.996 131301.9964
 4203 134732.00462 134732.00 134732.005 134732.0046
 4292 137585.00211 137585.00 137585.002 137585.0021
 4381 140437.99959 140438.00 140438.000 140437.9996
 4470 143290.99707 143291.00 143290.997 143290.9971
 4666 149574.00276 149574.00 149574.003 149574.0028
 4755 152427.00024 152427.00 152427.000 152427.0002
 4844 155279.99772 155280.00 155279.998 155279.9977
 4933 158132.99520 158133.00 158132.995 158132.9952
 5040 161563.00340 161563.00 161563.003 161563.0034
 5129 164416.00089 164416.00 164416.001 164416.0009
 5218 167268.99837 167269.00 167268.998 167268.9984
 5307 170121.99585 170122.00 170121.996 170121.9958
 5414 173552.00405 173552.00 173552.004 173552.0041
 5503 176405.00153 176405.00 176405.002 176405.0015
 5592 179257.99902 179258.00 179257.999 179257.9990
 5681 182110.99650 182111.00 182110.996 182110.9965
 5788 185541.00470 185541.00 185541.005 185541.0047
 5877 188394.00218 188394.00 188394.002 188394.0022
 5966 191246.99966 191247.00 191247.000 191246.9997
 6055 194099.99715 194100.00 194099.997 194099.9971
 6251 200383.00283 200383.00 200383.003 200383.0028
 6340 203236.00031 203236.00 203236.000 203236.0003
 6429 206088.99780 206089.00 206088.998 206088.9978
 6518 208941.99528 208942.00 208941.995 208941.9953
 6625 212372.00348 212372.00 212372.003 212372.0035
 6714 215225.00096 215225.00 215225.001 215225.0010
 6803 218077.99844 218078.00 218077.998 218077.9984
 6892 220930.99593 220931.00 220930.996 220930.9959
 6999 224361.00413 224361.00 224361.004 224361.0041
 7088 227214.00161 227214.00 227214.002 227214.0016
 7177 230066.99909 230067.00 230066.999 230066.9991
 7266 232919.99657 232920.00 232919.997 232919.9966
 7373 236350.00478 236350.00 236350.005 236350.0048
 7462 239203.00226 239203.00 239203.002 239203.0023
 7551 242055.99974 242056.00 242056.000 242055.9997
 7640 244908.99722 244909.00 244908.997 244908.9972
 7836 251192.00291 251192.00 251192.003 251192.0029
 7925 254045.00039 254045.00 254045.000 254045.0004
 8014 256897.99787 256898.00 256897.998 256897.9979
 8103 259750.99535 259751.00 259750.995 259750.9954
 8210 263181.00356 263181.00 263181.004 263181.0036
 8299 266034.00104 266034.00 266034.001 266034.0010
 8388 268886.99852 268887.00 268886.999 268886.9985
 8477 271739.99600 271740.00 271739.996 271739.9960
 8584 275170.00421 275170.00 275170.004 275170.0042
 8673 278023.00169 278023.00 278023.002 278023.0017
 8762 280875.99917 280876.00 280875.999 280875.9992
 8851 283728.99665 283729.00 283728.997 283728.9967
 8958 287159.00486 287159.00 287159.005 287159.0049
 9047 290012.00234 290012.00 290012.002 290012.0023
 9136 292864.99982 292865.00 292865.000 292864.9998
 9225 295717.99730 295718.00 295717.997 295717.9973
 9421 302001.00299 302001.00 302001.003 302001.0030
 9510 304854.00047 304854.00 304854.000 304854.0005
 9599 307706.99795 307707.00 307706.998 307706.9980
 9688 310559.99543 310560.00 310559.995 310559.9954
 9795 313990.00364 313990.00 313990.004 313990.0036
 9884 316843.00112 316843.00 316843.001 316843.0011
 9973 319695.99860 319696.00 319695.999 319695.9986
10062 322548.99608 322549.00 322548.996 322548.9961
10169 325979.00429 325979.00 325979.004 325979.0043
10258 328832.00177 328832.00 328832.002 328832.0018
10347 331684.99925 331685.00 331684.999 331684.9993
10436 334537.99673 334538.00 334537.997 334537.9967
10543 337968.00494 337968.00 337968.005 337968.0049
10632 340821.00242 340821.00 340821.002 340821.0024
10721 343673.99990 343674.00 343674.000 343673.9999
10810 346526.99738 346527.00 346526.997 346526.9974
11006 352810.00307 352810.00 352810.003 352810.0031
11095 355663.00055 355663.00 355663.001 355663.0006
11184 358515.99803 358516.00 358515.998 358515.9980
11273 361368.99551 361369.00 361368.996 361368.9955
11380 364799.00372 364799.00 364799.004 364799.0037
11469 367652.00120 367652.00 367652.001 367652.0012
11558 370504.99868 370505.00 370504.999 370504.9987
11647 373357.99616 373358.00 373357.996 373357.9962
11754 376788.00437 376788.00 376788.004 376788.0044
11843 379641.00185 379641.00 379641.002 379641.0018
11932 382493.99933 382494.00 382493.999 382493.9993
12021 385346.99681 385347.00 385346.997 385346.9968
12217 391630.00250 391630.00 391630.002 391630.0025
12306 394482.99998 394483.00 394483.000 394483.0000
12395 397335.99746 397336.00 397335.997 397335.9975
12591 403619.00315 403619.00 403619.003 403619.0031
12680 406472.00063 406472.00 406472.001 406472.0006
12769 409324.99811 409325.00 409324.998 409324.9981
12858 412177.99559 412178.00 412177.996 412177.9956
12965 415608.00380 415608.00 415608.004 415608.0038

Edited on February 5, 2013, 2:02 pm
  Posted by Charlie on 2013-02-05 13:56:06

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information