Mainly for Jon Hough This thread concerns Project Euler problem number 484; see https://projecteuler.net/problem=484 I've done it at last, more than a month after Jon reminded me. I'm solver number 96, so it's evidently quite difficult, considering the problem was posted last October.
My hint about a sieve was sort of helpful, but you need to prune the size of the working arrays drastically to solve for 5e15. I don't think I'm giving too much away to point out that every square- free number contributes just one to the required sum. My functions are very messy at the moment - they just growed and growed - so they're not worth sharing yet. So, have you solved it yet, Jon? All the best, Mike On 12/07/2015 20:07, Jon Hough wrote: > Raul's hint has reduced the size of the problem somewhat, but I still think I need to loop up to %: 5e15 which may be possible but I doubt it. I will think about it again tomorrow. > > --- Original Message --- > > From: mike_liz. [email protected] > Sent: July 13, 2015 3:39 AM > To: [email protected] > Subject: Re: [Jprogramming] Here we go again... another Project Euler Question > > Problem 484 is still on my to-do list. I haven't looked at > it in a > while, but my working script includes a remark: > NB. ... suggests a > sieve might be ok - but for 5e15????!!! > Also, I seemed to be trying to > use a moebius function or > Moebius' Theorem... > > As I haven't managed to > solve it yet, I don't suppose that is a > serious spoiler!!!! > > > Currently stuck on many of the 500s - they don't get easier, > > > Mike > > On > 11/07/2015 02:36, Raul Miller wrote: >> I don't do project euler, I've > never really gotten into it. But my >> impression is that the problems > are chosen to make brute force >> solutions impractical. >> >> Here, I > think I see a pattern in the relationship between >./@ (_&q:) >> and func > (for your definition of func) and I expect that the mechanism >> behind > that relationship will be worth exploring. >> >> Good luck, ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
