Problem 156

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


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
v6ph1
Posts: 134
Joined: Mon Aug 25, 2014 7:14 pm

Re: Problem 156

Post by v6ph1 »

1. Do not count the digits of each number one by one.
2. There exist a provable upper limit.
Image
qwarck
Posts: 3
Joined: Thu Oct 13, 2016 11:03 am

Re: Problem 156

Post by qwarck »

'provable upper limit' of what?
v6ph1
Posts: 134
Joined: Mon Aug 25, 2014 7:14 pm

Re: Problem 156

Post by v6ph1 »

A limit until the f(n,d)=n has some solutions.
Numbers n beyond that limit can be easily proven not to be solutions of f(n,d)=n.
Image
qwarck
Posts: 3
Joined: Thu Oct 13, 2016 11:03 am

Re: Problem 156

Post by qwarck »

I found a way how to calculate f(number, digit=1) for any number without actual counting one-by-one,
but I still can`t see how calculate sum of solutions to the equation f(n,1)=n without iterating through big range of numbers one by one.
v6ph1
Posts: 134
Joined: Mon Aug 25, 2014 7:14 pm

Re: Problem 156

Post by v6ph1 »

How many ones are in a specific decade, in a range of hundred or thousand?
Think a little bit about this question and you have an idea, where to optimize.
Image
Post Reply