Project Euler problem 384. I thought I’d be able to crack it in an afternoon, but a couple week’s later I’m still stumped. I finally moved to another problem in the hopes of being able to return to 384 with fresh eyes, but no joy just yet.
I’m not sure if there’s a lesson to learn from the failure, except that to do a good estimate about how much work something will take often itself requires a bit of work.
At first glance I see a few sub-problems that don’t look hard, but the list s(n) will get huge but have a ton of repetition so you could just make a list of occurrences of each number instead of just the list of s(n), and this would make finding the nth occurrence trivial. You wouldn’t need to keep much of the list, only the fibonacci numbers.
Project Euler problem 384. I thought I’d be able to crack it in an afternoon, but a couple week’s later I’m still stumped. I finally moved to another problem in the hopes of being able to return to 384 with fresh eyes, but no joy just yet.
I’m not sure if there’s a lesson to learn from the failure, except that to do a good estimate about how much work something will take often itself requires a bit of work.
Wow. That looks difficult.
At first glance I see a few sub-problems that don’t look hard, but the list s(n) will get huge but have a ton of repetition so you could just make a list of occurrences of each number instead of just the list of s(n), and this would make finding the nth occurrence trivial. You wouldn’t need to keep much of the list, only the fibonacci numbers.