## Problem 684

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.
Kenya_A
Posts: 3
Joined: Sat Dec 12, 2015 4:09 am

### Problem 684

Problem 684 (View Problem)
Hi,
I haven't solved this yet, but I noticed that the example number has the same quotient and remainder when divisible by 9, so it's impossible to tell using it alone if you have made a mistake in entering one of these into the solution.

I can't solve it because, try I might, I haven't found enough tricks to calculating the numbers in a reasonable time and without overflow. I have done modulo operations after each addition and multiplication, tried (and abandoned in favour of built-ins) a method of modular exponentiation which cancels out much of the multiplying by setting the relevant exponents mod x to 1, and found closed form expressions for the sums. The limit is the exponentiations. What, besides maybe the F's thm, can speed this up? It may be finished yet by this time next year at this rate.

835410_BD2wXg2iurN8FEuwdp659qnINUNqNKbA

hk
Administrator
Posts: 10674
Joined: Sun Mar 26, 2006 9:34 am
Location: Haren, Netherlands

### Re: Problem 684

In the big pink box at the top of the page it reads:

'Don't ask for hints how to solve a problem'

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

### Re: Problem 684

Hi,
Is sum from i=2 to i=30 S(fi) (mod 1_000_000_007) equal to xxxxxxxxx? <value snipped by moderator>
Thank you.

RudiGj
Posts: 1
Joined: Fri Jan 03, 2020 11:59 pm

### Re: Problem 684

Just need a little bit of clarification on this problem.

Do you have to find the smallest digit sum for each term of the fibonacci sequence from the 2nd to the 90th?

Therefore the answer would be:

digitsum(1) + digitsum(2) + digitsum(3) + digitsum(5) + digitsum(8) + .... + digitsum(n) until the 90th term?

RobertStanforth
Administrator
Posts: 1237
Joined: Mon Dec 30, 2013 11:25 pm

### Re: Problem 684

RudiGj wrote:
Sat Jan 04, 2020 12:04 am
Do you have to find the smallest digit sum for each term of the fibonacci sequence from the 2nd to the 90th?
No, that is not correct. $S(n)$ is not digitsum.
Instead, $s(n)$ is the inverse digit sum, so $\mathrm{digitsum}(s(n)) = n$.
Note also that $S$ is the sum of $s$.

So, (given a Fibonacci number $f_i$), you have to find the smallest number whose digit sum is $n$, for each number $n$ up to $f_i$. Their sum gives you $S(f_i)$.
Then the answer would be: $S(1) + S(2) + S(3) + S(5) + S(8) + ... + S(f_{90})$.