mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)
-   -   Efficient Integer Representations of Irrationals (https://www.mersenneforum.org/showthread.php?t=12601)

Raman 2009-10-28 15:14

There is a power of 7, very early that is surprisingly very close to a power of 10.
7[sup]510[/sup] ~ 10[sup]431[/sup]
This creates out a big number early in the continued fraction expansion for log 7.
How efficient is the approximation for log 7 as 431/510?

How good is the approximation for log 3 as 8519/17855?
Also, have a look up at the continued fraction expansions of the other logarithms too.
All these logarithms are to the base 10 only.
log 2, log 3, log 6, log 7, log 11...
log 5 = 1 - log 2: So that it creates up the same fractions within the continued fraction expansion essentially.

JonBarleycorn 2009-11-22 23:58

Efficient Integer Representations of Irrationals
 
What are the most efficient integer representations of the irrational numbers π and e?

An efficient integer representation of an irrational number is defined as two integers p/q which, when expressed as a decimal, gives at least as many significant digits as the sum of the digits in p and in q. Thus, an efficient representation will be both mnemonic and accurate, requiring no fewer digits to write than the accuracy gained.

For example, 22/7[FONT=&quot][/FONT] is an efficient integer representation of π (3.141592653589793238 …) since the sum of the integer digits (2 + 1) is 3 and 22/7 is accurate to just a bit better than 1 part in 791. Note that 22/7 – 1/791 [FONT=&quot][/FONT]= 355/113.

This representation, 355/113, is both efficient and memorable since it takes just 6 digits to get 7 digit accuracy (1 part in 3,748,629).

There was a nice discussion by ewmayer and CRGreathouse of a metric that gives a slight edge in efficiency to 22/7. But, 355/113 is reasonably memorable, and, it is the only representation to give a full digit of additional accuracy. Thus, this simple minded approach gives 355/113 the efficiency prize.

Finding a mnemonic representation for e (2.71828182845904523 …) is probably unnecessary because of the repeating ‘1828’ group. However, an efficient 3 digit representation is 19/7 which is good to about 1 part in 250. A 5 digit representation, 193/71, is good to 1 part in 35,675. An eight digit representation, 2721/1001, while accurate to 1 part in 9,076,277, is not efficient (8 digits needed for 7 digit accuracy). However, it is fairly easy to remember so it is being mentioned.

Others have pointed out that 49171/18089 = 2.718281828735. This is efficient and accurate to 1 part in 3,614,669,163. But, e itself, is just as easy to remember to 10 digits because of the repeating 1828 group so I cannot award 49171/18089 the prize.

Given that short term memory is limited to about 7 +/- [FONT=&quot][/FONT]2 chunks of information, further exploration with larger fractions is probably fruitless.

JB

philmoore 2009-11-23 00:18

Thanks for the concise essay, JB. I remember reading somewhere of an Arabic mathematician of the middle ages questioning why 22/7 was being used for pi when it was "common knowledge" that 355/113 was a much better approximation!

biwema 2009-11-23 21:32

[QUOTE=mart_r;193667]A good one is 355/113.
There's this number 20776 at position 432 in the continued fraction expansion of pi, if I would calculate the fraction of the 431 previous terms I would also get an efficient integer representation, or whenever such a large number in the continued fraction appears.

The best known approximation is log(640320³+744)/sqrt(163) - it gives 31 significant digits!

Edit: but I don't know of any really good approximations for e.[/QUOTE]


There are efficient ways to write e.

(1 + 1/999!)^(999!)

gives more than 2500 digits of e.

Nevertheless i think it is not a valid solution because it is a general defintion of e:
(1+1/n)^n approximates e when n goes to infinity.

On the other hand the 31 digits approximation of pi is neat but neither a fraction as mentioined in this thread.

JonBarleycorn 2009-11-24 07:25

Forgive me if my calculator is not working right, but every time I tried log(640320 cubed + 744) / sqrt(163) I got 12.767145.. even when I used all the precision that Windows has to offer.

If I got it wrong then I owe [B]mart_r[/B] an apology.

I'm sorry I wasn't more clear that I was looking for 2 integers p, q such that p/q was memorable and a good representation of pi and e. I hope that I was more clear in my statement of the problem the second time around.

That said, some of the excursions were really first class, and, I was really impressed by the caliber of discourse that my little puzzle elicited! Thanks to all who responded.

JB

retina 2009-11-24 07:42

[QUOTE=JonBarleycorn;196856]Forgive me if my calculator is not working right, but every time I tried log(640320 cubed + 744) / sqrt(163) I got 12.767145.. even when I used all the precision that Windows has to offer.

If I got it wrong then I owe [B]mart_r[/B] an apology.

I'm sorry I wasn't more clear that I was looking for 2 integers p, q such that p/q was memorable and a good representation of pi and e. I hope that I was more clear in my statement of the problem the second time around.

That said, some of the excursions were really first class, and, I was really impressed by the caliber of discourse that my little puzzle elicited! Thanks to all who responded.

JB[/QUOTE]For the "log" press the "ln" button.

But your answer above, 12.767145.., is simply sqrt(163). Perhaps your forgot to press the "=" button?

davieddy 2009-11-24 17:07

The Well-tempered Klavier
 
2^(7/12) = ~3/2

So 7 "equal" semitones make nearly a "perfect fifth"
and 5 nearly a "perfect fourth"

Johann Sebastian

Raman 2012-03-24 18:06

One of the ways to compute the efficiency of an approximation for irrationals
by using a given fraction
x = p/q
is to compute the error ratio for
(10[sup]x[/sup])[sup]q[/sup] against (10[sup]p[/sup]) and then multiply it by using p.

Taking the value for x = log 2 ~ 3/10
for an example, the error ratio for
2[sup]10[/sup] against 10[sup]3[/sup] = 2.4% Multiplying it with the exponent 3, yields the ratio 7.2
for 6/20, 2[sup]20[/sup] against 10[sup]6[/sup] = 4.8576% Multiplying it with the exponent 6 yields the ratio 29.1456
So, this ratio increases when the numerator, denominator together are being multiplied by using the multiplier. Lowest terms always give the best approximation factor ratios.

For log 2, the ratio for
28/93 = 27.014312
59/196 = 25.584038
146/485 = 15.190773
[B]643/2136 = 10.474093[/B]
4004/13301 = 25.512806
30103/100000 = 3003.9994

For log 3, the ratio for
21/44 = 31.981105
73/153 = 7.52696
1074/2251 = 13.755307
[B]8519/17855 = 5.923131[/B]

The fun is that
73/153, when both the numerator, denominator are being multiplied by using 2232, yields 162936/341496
but that the value for 162935/341496 is always being a better closer approximation to the value for log 3

For [B]log 6[/B], undoubtedly the best approximation =
[COLOR=Blue][B]463/595[/B][/COLOR] with the ratio = [B]0.64197[/B]
against the fraction [I]7/9[/I], with such ratio, factor = [I]5.43872[/I]

For [B]log 7[/B], undoubtedly the best approximation =
[COLOR=Red][B]431/510[/B][/COLOR] with the ratio = [B]0.040418[/B]

This is being the effect for the big term very early within the continued fraction expansion for log 7 =
[SIZE=+1]1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]5[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]2[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]5[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]6[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[COLOR=Red][B][URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%287%29%2Flog%2810%29&precision=20&num_style=1#"]4813[/URL][/B][/COLOR]+ ...

For log 6,
[/SIZE]0 + [SIZE=+1] 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]3[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[I][URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]32[/URL][/I]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]1[/URL]+ 1/[B][URL="http://wims.unice.fr/wims/wims.cgi?session=AD5D17D723.3&lang=en&cmd=reply&module=tool%2Fnumber%2Fcontfrac.en&formula=log%286%29%2Flog%2810%29&precision=20&num_style=1#"]278[/URL][/B]+ ...[/SIZE]

[SIZE=2]Comparing against the efficient approximations values for PI
22/7 = 14.1224069
333/106 = 683.29723[/SIZE][SIZE=2]14[/SIZE]
[B][SIZE=2]355/113 = 2.46396731[/SIZE][/B][SIZE=+1]
[/SIZE]

Raman 2012-03-24 18:59

Question
 
Taking the continued fraction expansion for (log b)
gives out the powers of b (within the denominator), digits (within the numerator), that are being increasingly closer to the powers of 10.

[B]Question[/B]. Is there any way to give out the sequence for the powers of N that are being increasingly closer to the values for that following form, k.10[sup]n[/sup]?

For this example, consider with the following terms that are being

2[sup]171[/sup] ≈ 3.10[sup]51[/sup]
2[sup]1337[/sup] ≈ 3.10[sup]402[/sup]
2[sup]30075[/sup] ≈ 3.10[sup]9053[/sup]

2[sup]46[/sup] ≈ 7.10[sup]13[/sup]
2[sup]335[/sup] ≈ 7.10[sup]100[/sup]
2[sup]2471[/sup] ≈ 7.10[sup]743[/sup]
2[sup]15772[/sup] ≈ 7.10[sup]4747[/sup]
2[sup]157326[/sup] ≈ 7.10[sup]47359[/sup]

2[sup]53[/sup] ≈ 9.10[sup]15[/sup]
2[sup]538[/sup] ≈ 9.10[sup]161[/sup]
2[sup]2674[/sup] ≈ 9.10[sup]804[/sup]
2[sup]4810[/sup] ≈ 9.10[sup]1447[/sup]
2[sup]60150[/sup] ≈ 9.10[sup]18106[/sup]

Here are a few more good approximations
7.2[sup]2239[/sup] ≈ 71.10[sup]673[/sup]
3[sup]-14263[/sup] ≈ 66.10[sup]-6807[/sup]
3[sup]21973[/sup] ≈ 61.10[sup]10482[/sup]

3[sup]6565[/sup] ≈ 2.10[sup]3132[/sup] [COLOR=White]________[/COLOR] 3[sup]10475[/sup] ≈ 7.10[sup]4997[/sup] [COLOR=White]_______[/COLOR] 7.3[sup]17[/sup] ≈ 9.10[sup]8[/sup] [COLOR=White] _______[/COLOR] 3[sup]94[/sup] ≈ 7.10[sup]44[/sup]
3[sup]13130[/sup] ≈ 4.10[sup]6264[/sup] [COLOR=White]_______[/COLOR] 3[sup]4091[/sup] ≈ 8.10[sup]1951[/sup] [COLOR=White]________[/COLOR] 3[sup]35[/sup] ≈ 5.10[sup]16[/sup] [COLOR=White] ________[/COLOR] 3[sup]138[/sup] ≈ 7.10[sup]65[/sup]
3[sup]11290[/sup] ≈ 5.10[sup]5386[/sup] [COLOR=White]_______[/COLOR] 3[sup]4725[/sup] ≈ 25.10[sup]2253[/sup] [COLOR=White] _______[/COLOR] 3[sup]48[/sup] ≈ 8.10[sup]22[/sup] [COLOR=White]________[/COLOR] 7.3[sup]109[/sup] ≈ 71.10[sup]51[/sup]
3[sup]6566[/sup] ≈ 6.10[sup]3132[/sup] [COLOR=White] ________[/COLOR] 3[sup]3592[/sup] ≈ 66.10[sup]1712[/sup] [COLOR=White]_______[/COLOR] 3[sup]83[/sup] ≈ 4.10[sup]39[/sup][COLOR=White]_______[/COLOR][COLOR=White]_[/COLOR][COLOR=White]_[/COLOR][COLOR=White][/COLOR] 7.2[sup]103[/sup] ≈ 71.10[sup]30[/sup]
3[sup]12726[/sup] ≈ 7.10[sup]6071[/sup] [COLOR=White]_______[/COLOR] 3[sup]21447[/sup] ≈ 66.10[sup]10231[/sup] [COLOR=White]___[/COLOR][COLOR=White]_[/COLOR][COLOR=White]_[/COLOR] 3[sup]188[/sup] ≈ 5.10[sup]89[/sup]
3[sup]1840[/sup] ≈ 8.10[sup]877[/sup] [COLOR=White] _________[/COLOR] 3[sup]4118[/sup] ≈ 61.10[sup]1963[/sup] [COLOR=White] _______[/COLOR] 3[sup]223[/sup] ≈ 25.10[sup]105[/sup]

Raman 2012-03-30 07:14

[QUOTE=Raman;294058]
For this example, consider with the following terms that are being

27.2[sup]301[/sup] ≈ 11.10[sup]91[/sup][COLOR=LightBlue]________[/COLOR]267.2[sup]18[/sup] ≈ 7.10[sup]7[/sup]
1249.2[sup]56[/sup] ≈ 9.10[sup]19[/sup][COLOR=LightBlue]________[/COLOR]266999.2[sup]25[/sup] ≈ 8959.10[sup]9[/sup]
9.5[sup]53[/sup] ≈ 10[sup]38[/sup][COLOR=LightBlue]_____________[/COLOR]439.3[sup]13[/sup] ≈ 7.10[sup]8[/sup]
2[sup]317[/sup] ≈ 267.10[sup]93[/sup][COLOR=LightBlue]__________[/COLOR]7.3[sup]17[/sup] ≈ 904.10[sup]6[/sup]
2[sup]511[/sup] ≈ 67.10[sup]152[/sup][COLOR=LightBlue]__________[/COLOR]7.3[sup]6[/sup] ≈ 51.10[sup]2[/sup]
67.2[sup]27[/sup] ≈ 9.10[sup]9[/sup][COLOR=LightBlue]_______[/COLOR][COLOR=LightBlue]__[/COLOR][COLOR=LightBlue]__[/COLOR]7.3[sup]17[/sup] ≈ 9.10[sup]8[/sup]

[/QUOTE]

Taking the continued fraction expansion for (log b)
gives out the powers of b (within the denominator), digits (within the numerator), that are being increasingly closer to the powers of 10.

[B]Question[/B]. Is there any way to give out the sequence for the powers of N that are being increasingly closer to the values for that following form, k.10[sup]n[/sup]?

jasonp 2012-03-30 13:04

Yes, there is a standard estimate for the error term between a continued fraction and the decimal number it is supposed to represent, based only on the size of p and q (it's been ~15 years, I don't remember it). You can also prove that to get a better approximation of the error, you must use numbers larger than p and q.


All times are UTC. The time now is 14:05.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.