Deutsch English Français Italiano |
<usihki$15j79$1@solani.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Physfitfreak <Physfitfreak@gmail.com> Newsgroups: comp.os.linux.advocacy Subject: Re: Project Euclid Problem 26 SOLVED!!! Date: Sat, 9 Mar 2024 14:42:56 -0600 Message-ID: <usihki$15j79$1@solani.org> References: <17bb1baebce14546$13883$3298354$802601b3@news.usenetexpress.com> <usidqe$15gr6$2@solani.org> <17bb311956b74503$4$3602787$802601b3@news.usenetexpress.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 9 Mar 2024 20:42:58 -0000 (UTC) Injection-Info: solani.org; logging-data="1232105"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:yQWh0AVhJrvYHdE3/2aWjRzuENs= X-Antivirus-Status: Clean X-Antivirus: Avast (VPS 240309-4, 3/9/2024), Outbound message Content-Language: en-US In-Reply-To: <17bb311956b74503$4$3602787$802601b3@news.usenetexpress.com> X-User-ID: eJwNyNEVADEEBMCWIiy2HOHpv4S7+Ryoi3eYww2Lnep9IzJ+vZ6fTTYbkXFtmMyrR0pb/6JQDQWZlPPILMQHUygUjQ== Bytes: 3000 Lines: 40 On 3/9/2024 2:01 PM, Diego Garcia wrote: > You have to enter this code into Maxima/wxMaxima and then you'll > see the complete answer. Sadism :) That Coke contest, which turned out requiring ordering from Walmart before it happens. But thanks for the answer. It's not clear what algorithm you used that was better than brute force, but brute force also is not that bad in this case. There aren't that many denominators under 1000 that have primes other than 2 or 5 as factors. That reduces the loop count dramatically. And among what remains, one can eliminate, very fast, cases of low number of repeating decimals unless a very large number is stumbled upon early in the loop. Then the brute force on the remainder of the cases will advance pretty well to find the longest repeating decimals. I was expecting that some cases would have repetitions much larger than 982 decimals, so I'm kind of suspicious of the answer you got. But I can't think of a way to test its accuracy in being the maximum. I wish there was a chart I could look up, giving denominator integers (with prime factors other than 2 and 5) as its x axis and max number of repeating decimals as the y axis. With x interval going to about a million or even a billion. It probably would need to be a logarithmic chart to contain the results in a page. But one could get a nice idea how this thing goes by taking a look at that. Are there surprises early on for smaller integers, or big numbers begin to show only later on in the chart for larger integers. If such plot doesn't show surprises, then I'd take your result as accurate. Otherwise, it remains suspect to me. -- This email has been checked for viruses by Avast antivirus software. www.avast.com