## Problem 485

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one

Don't post any spoilers
Oliver1978
Posts: 165
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

### Problem 485

Let d(n) be the number of divisors of n.
Are 1 and n also considered to be divisors of n in this problem?
49.157.5694.1125

nicolas.patrois
Posts: 117
Joined: Fri Jul 26, 2013 3:54 pm
Contact:

### Re: Problem 485

Why not?

Oliver1978
Posts: 165
Joined: Sat Nov 22, 2014 9:13 pm
Location: Erfurt, Germany

### Re: Problem 485

Only making sure I don't miss anything
49.157.5694.1125

Jochen_P
Posts: 53
Joined: Mon Oct 05, 2009 9:47 am
Location: Stuttgart, Germany

### Re: Problem 485

I keep getting 16739 for S(1000,10), pretty fast but obviously wrong.

I'm pretty sure my algo for S() should work though. Got the wrong result for the problems answer in about 126 seconds

Anyone keen to give a second pair of eyes on my python code, or experienced the same dead end and give a hint?

kenbrooker
Posts: 124
Joined: Mon Feb 19, 2018 3:05 am
Location: Oregon, USA

### Re: Problem 485

Jochen_P wrote:
Mon Dec 03, 2018 5:38 pm
I keep getting 16739 for S(1000,10), pretty fast but obviously wrong.
You might want to reconsider the number of divisors you compute for perfect squares...
"Good Judgment comes from Experience;
..."

Jochen_P
Posts: 53
Joined: Mon Oct 05, 2009 9:47 am
Location: Stuttgart, Germany

### Re: Problem 485

Hi Ken,

good hint, but my Divisor Count function is ok (got the correct result for S(1000,10) by doing it the naive way, which would take days for the original Problem)

There is something obvious wrong with my S() implementation which I just don't see yet .. proofed only test cases yet, maybe there are exceptions I don't have realized yet.
Will run it with lower bounds and debug prints tonight

Jochen_P
Posts: 53
Joined: Mon Oct 05, 2009 9:47 am
Location: Stuttgart, Germany

### Re: Problem 485

Crickey!

this was a real brainf* regarding zero based indexes and bounds and predictive computing in reachable ranges.
Brain hurts big time, but now I got the test case correct (below 1 msec)

 sure enough my final answer is still wrong! I hate this problem [/edit]

Jochen_P
Posts: 53
Joined: Mon Oct 05, 2009 9:47 am
Location: Stuttgart, Germany

### Re: Problem 485

Finally!

one minor tweak made it general use ... Phew, that was hard work. [you may visit the problems forum post #91 to make fun of me ]
Now only one to go to reach level 8

kenbrooker
Posts: 124
Joined: Mon Feb 19, 2018 3:05 am
Location: Oregon, USA

### Re: Problem 485

Jochen_P wrote:
Tue Dec 04, 2018 2:08 pm
Finally! Now only one to go to reach level 8
"Good Judgment comes from Experience;