Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

My answer matches with gAr's.

Why are you hiding posts like #25? It contains no spoiler

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

I am rechecking the whole calculation again.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

You mean the program, right?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

The program is only doing what I told it to do. There was a calculation I used.

I only hope I was right else phrontister is going to be really annoyed at me.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

phrontister is wrong anyway.

Will you post a picture of the exploding frog?

'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'

'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'

'You have made another human being happy. There is no greater accomplishment.' -bobbym

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Yes, I will but first the mystery must be solved.

**In mathematics, you don't understand things. You just get used to them.**

**I agree with you regarding the satisfaction and importance of actually computing some numbers. I can't tell you how often I see time and money wasted because someone didn't bother to run the numbers.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Hi bobbym,

Okay, but I think I have translated your question to algorithm correctly.

Also,

"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi gAr;

It is looking like that when I formulated the problem I made the frog eat the first fly. In the Josephus problem the first one is [not] eaten. I will rewrite my answer.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Hi,

Yes, we need to tweak the code or input.

Anyway, my answer is for your question..

"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Their list starts from 0, you took that to consideration?

"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Yes, there problem does not kill the starting fly. Mine does. In other words mine kills the first fly it lands on and then jumps. The regular Josephus, jumps from the first fly without killing him.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Yes, tweak the input: let it be 2, 3, 4 ... 2014 instead of 0, 1 ... 2013

Worked for the python program there.

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi;

It gets 1107 which still does not agree.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

For the input I suggested?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi;

Yes, for 2,3,4,...2014

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Did you nest n-2 times instead of n-1?

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi gAr;

I have some working code now. I rewrote in a form I can understand.

**In mathematics, you don't understand things. You just get used to them.**

Offline

**gAr****Member**- Registered: 2011-01-09
- Posts: 3,479

Hi bobbym,

Started up raspbian to check the Mm code.

What I thought worked:

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

hi gAr;

**In mathematics, you don't understand things. You just get used to them.**

Offline

**phrontister****Real Member**- From: The Land of Tomorrow
- Registered: 2009-07-12
- Posts: 4,006

Hi,

Finally ironed out my errors and got there!

If the frog hadn't consumed the flies at such dazzling speed and allowed adequate digestion time to avoid exploding, he could have got the last one as well...during lap 135. But, given the number of extra laps required for the frog to get there after eating his 2013th fly, and also taking into account the frog's reduced speed by then due to wind-drag on his bloated stomach, the fly might have seen him coming by then and flown away in time!

"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi;

**In mathematics, you don't understand things. You just get used to them.**

Offline

**ShivamS****Member**- Registered: 2011-02-07
- Posts: 3,640

I don't understand what's happening...

Offline

**bobbym****Administrator**- From: Bumpkinland
- Registered: 2009-04-12
- Posts: 93,991

Hi;

**In mathematics, you don't understand things. You just get used to them.**

Offline

**ShivamS****Member**- Registered: 2011-02-07
- Posts: 3,640

It's close but I have gotten multiple answers. The first time I got the same as phronister's but then I realized it was because we didn't take the spaces out. After that, I've gotten another weird one and then this. I'll try again.

Offline