Of the Natural numbers from 1 to 10^100, find N such that ABS(SIN(N)) is the smallest one!

We might have a relative winner here. Someone may say SIN(1)=0.841…

Can you do any better?

Advertisements

Of the Natural numbers from 1 to 10^100, find N such that ABS(SIN(N)) is the smallest one!

We might have a relative winner here. Someone may say SIN(1)=0.841…

Can you do any better?

Advertisements

%d bloggers like this:

For start 🙂

80143857 = 1.4772846817965908e-8

Ineresting:

1 = 0.8414709848078965

3 = 0.1411200080598672

22 = 0.008851309290403876

333 = 0.008821166113885877

355 = 0.00003014435335948845

103993 = 0.000019129335778423752

104348 = 0.000011015017584240557

208341 = 0.000008114318195038078

312689 = 0.000002900699389332111

833719 = 0.0000023129194164527015

1146408 = 5.877799728813812e-7

4272943 = 5.495794978104908e-7

5419351 = 3.8200475070896605e-8

80143857 = 1.4772846817965908e-8

165707065 = 8.654781434964792e-9

245850922 = 6.1180653830011166e-9

411557987 = 2.5367160519636766e-9

Bruta forza FTW: https://jsfiddle.net/ggb2s50f/

Some people suggested, that you only have to find a good rational approximation for Pi, like 22/7 or 355/113 and then SIN(22) is close to 0 and SIN(355) is close to 0.

You seemingly proving that with two results above.

However, 7^7/2^18 is 3.1415672.., but SIN(7^7)=-.3722 …

A good approximation for Pi, still the counter 7^7 is a lousy solution,

How we are doing this:

http://lesswrong.com/r/discussion/lw/ofo/open_thread_jan_09_jan_15_2017/dkgo

I prefer talking here, where I am more at home. But what can you do about it? 😉

As you can see on the link, we have a solution by Cousin Italian. It is the solution.

Gareth McCaughan found it too, but he had a typo with additional 9 at the end.

7651502734877145442576129882280145997399533964991618287115405543322160824753834564921930038855560478

Sine is periodic and so one way to brute force this is to multiply pi with an integer, say 103604811, and see how long a series of zeros it yields: 325484113,11415900000000009828507345…

One then takes everything left of the block of zeros (omitting the comma, which is basically multiplying with a power of ten) and plugs the integer into sin:

sin(325484113114159) = -9,828507345621e-11

Thanks for making me learn some Python to get this 🙂

This is generally the way I had in mind for solving this class of problems. Brute force tweaking of the best solution so far – as long as is needed.

Should be O(log(N)) complex.