### problem 155

Posted:

**Sat Mar 21, 2009 12:49 pm**Can anybody please confirm me if the values D(4) = 15 and D(5) = 35 are correct.

thanks in advance.

thanks in advance.

A website dedicated to the puzzling world of mathematics and programming

https://projecteuler.chat/

Page **1** of **1**

Posted: **Sat Mar 21, 2009 12:49 pm**

Can anybody please confirm me if the values D(4) = 15 and D(5) = 35 are correct.

thanks in advance.

thanks in advance.

Posted: **Sat Mar 21, 2009 12:52 pm**

Yes, they are correct.

Posted: **Sat Mar 21, 2009 1:13 pm**

Thanks Tommy. I really cannot understand the problem with my algorithm. Is D(10) = 2491.

Posted: **Sat Mar 21, 2009 1:15 pm**

Unfortunately, it's wrong

Posted: **Sat Aug 20, 2011 8:01 pm**

I don't get it either...

Is it wrong to think, that the only new capacitor combinations are the ones from the previous, with max number of capacitors, + a series and a paralel with a new 60 microfahrad capacitor?

ex

if we have 2 2 capacitor combinations, then there will be 4 extra in the next, and 8 extra in the next and so on?

I cannot imagine how else a combination would be made, but then my D(5) = 31, and i don't see where the 4 extra comes from

Is it wrong to think, that the only new capacitor combinations are the ones from the previous, with max number of capacitors, + a series and a paralel with a new 60 microfahrad capacitor?

ex

if we have 2 2 capacitor combinations, then there will be 4 extra in the next, and 8 extra in the next and so on?

I cannot imagine how else a combination would be made, but then my D(5) = 31, and i don't see where the 4 extra comes from

Posted: **Sat Aug 20, 2011 8:52 pm**

Hint: 5 = 1+4 = 2+3Schwein wrote:I cannot imagine how else a combination would be made, but then my D(5) = 31, and i don't see where the 4 extra comes from

Remember also that we only care about the different values - some values can be made in several completely different ways, so that is another reason why it won't be a simple doubling sequence.

Posted: **Sat Aug 20, 2011 9:56 pm**

I had the part covered, that some values might be equal(turned out none of them were, when i just added one in series, and one in paralel, for each combo), the only thing i don't understand, is why that does not give me all the different combinations makeable...

Posted: **Sat Aug 20, 2011 10:10 pm**

How about combining larger, 'composite' capacitors in series or parallel? (This is what hk meant above as well)Schwein wrote:the only thing i don't understand, is why that does not give me all the different combinations makeable...

Think about $1 = \frac1{1+1}+\frac1{1+1}$.

Posted: **Sat Aug 20, 2011 10:21 pm**

Ahhhhh, thank you were much the both of you, I see now where my logic fails ^^

Posted: **Sun Jan 12, 2014 3:45 pm**

It seems I can't get it right... I get the correct results for D(4) and D(5). Then D(6) = 76 and D(10) = 2147. Are these values correct?

Posted: **Sun Jan 12, 2014 6:44 pm**

No.Erf_Erf wrote:It seems I can't get it right... I get the correct results for D(4) and D(5). Then D(6) = 76 and D(10) = 2147. Are these values correct?

Posted: **Sun Jan 12, 2014 11:21 pm**

I just found the annoyingly trivial and almost invisible mistake in my code, and finally got the correct answer.

Posted: **Tue Jul 09, 2019 5:00 pm**

Hi all,

Could I ask for two pieces of input here:

1) D(13) is a 5-digit figure starting with a 4 and ending in an even digit - is that correct?

2) I'm using float values in C and my suspicion is that my solutions turns out wrong because of a precision issue. I've tried (long) double but the result is no more convincing. Should I try to go for the alternative of defining and manipulating fractions (as Wodehouse would have said: I've just had a look at what my mind is doing, and it turns out: it boggles!) or should I rather look for something else - my choice of value for the capacitance for example.

Cheers,

Claude

Could I ask for two pieces of input here:

1) D(13) is a 5-digit figure starting with a 4 and ending in an even digit - is that correct?

2) I'm using float values in C and my suspicion is that my solutions turns out wrong because of a precision issue. I've tried (long) double but the result is no more convincing. Should I try to go for the alternative of defining and manipulating fractions (as Wodehouse would have said: I've just had a look at what my mind is doing, and it turns out: it boggles!) or should I rather look for something else - my choice of value for the capacitance for example.

Cheers,

Claude

Posted: **Fri Jul 12, 2019 6:55 am**

Claude,

to answer your first question:

D(13) is indeed a 5-digit figure but it starts with 3 and ends with an odd digit.

hth

Jochen

to answer your first question:

D(13) is indeed a 5-digit figure but it starts with 3 and ends with an odd digit.

hth

Jochen

Posted: **Fri Jul 12, 2019 8:03 am**

Right, back to the drawing board then ...

Thanks for getting back though!

Thanks for getting back though!