[Archive!] Pure mathematics, physics, chemistry, etc.: brain-training problems not related to trade in any way - page 453

 
Mathemat:

1. note that in my last piece of proof for amounts less than 100 there were only 4 amounts left: 17, 29, 41, 53. All of them are prime, and moreover, they are represented in the singular form 2^n+prime. That's what stresses me when I look at your solutions.

2. What do you keep in your big table? It seems like there's a lot of unnecessary stuff in there. What's a pundit doing with 5 million numbers in his head?

3. Found the first 1000 prime on the internet - up to about 8,000.

1. I get it. You better tell me what you need to print out for verification. So you can get a manageable printout.

2. In the table - the decomposition of the numbers into multipliers. It has different length for all numbers, butdo not make dynamic arrays, because they also consume a lot of memory.

Take a look at the mql5:

A dynamic array is a structure with size 40 bytes. 3.

3. it won't help us. But... I'll give it some thought.

--

Okay. I've been thinking. You could save some money (in as many as two ways). But that's not really relevant now. We don't need to find new solutions, we need to check the old ones.

So let's think about the first point - what to print to check.

 
MetaDriver: So go ahead and think about the first point - what to print out to check.
Easy to say, harder to do. It takes time to think it through. The hardest part is checking before the last line.
 
Mathemat:
Easy to say, harder to do. It takes time to think it through. The hardest part is checking before the last line.
I'm making progress. It's coming.
 

Phew. Done. It's crooked, but it works. Here's the printout and script.

I had to go to a lot of trouble to do it without significantly rewriting what I'd done and without making the printout endless.

Cuts off output of test checks when only even-numbered candidates remain (non-invalid by lemma).


2011.01.16 02:24:19 MetaSage (EURUSD,M1) //+---- Maximum amount = 6000 -------------------+
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test =>..... etc. All other options false, for even.
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 2+274392=274394 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 34299+16=34315 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 333+1648=1981 false

01.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 927+592=1519 true // allocated to servicedesk
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 9+60976=60985 false
2011.01.
16 02:23:5216 02:23:52 MetaSage (EURUSD,M1) Test => 11433+48=11481 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 111+4944=5055 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 309+1776=2085 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 3+182928=182931 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 11433+48=11481 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 111+4944=5055 false
2011.01.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 309+1776=2085 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 3+182928=182931 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 3811+144=3955 false
2011.01.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 37+14832=14869 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) Test => 103+5328=5431 false
2011.01.16 02:23:52 MetaSage (EURUSD,M1) S=373; P=19776; a=64; b=309
2011.01.01.16 02:23:52 MetaSage (EURUSD,M1) S=343; P=9952; a=32; b=311
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=233; P=916; a=4; b=229
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=217; P=11392; a=89; b=128
2011.01.01.16 02:23:51 MetaSage (EURUSD,M1) S=163; P=4192; a=32; b=131
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=137; P=4672; a=64; b=73
2011.01.16 02:23:51 MetaSage (EURUSD,M1) Test =>..... etc. All other options are false, for even.
2011.01.16 02:23:51 MetaSage (EURUSD,M1) Test => 2+888=890 false
2011.01.16 02:23:51 MetaSage (EURUSD,M1) Test => 111+16=127 true
2011.01.16 02:23:51 GMT (EURUSD,M1) Test => 3+592=595 false
2011.01.16 02:23:51 AM MetaSage (EURUSD,M1) Test => 37+48=85 false
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=127; P=1776; a=16; b=111
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=89; P=1168; a=16; b=73
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=65; P=244; a=4; b=61
2011.01.16 02:23:51 MetaSage (EURUSD,M1) S=17; P=52; a=4; b=13
2011.01.16 02:23:00 MetaSage (EURUSD, M1) With SMax=6000 PMax = SMax*(SMax/6-1) = 5994000
2011.01.16 02:22:59 MetaSage (EURUSD,M1) //+---- Max = 6000 -------------------+
2011.01.16 02:22:59 MetaSage (EURUSD,M1) //============== START ========================

Files:
 

There is an error in the printout of the previous post. I noticed it as soon as it was sent, so I started looking for the bug.

Took me two hours to debug it. It seems to be some intricate bug in mt5 optimizer is glitching.

But in debug mode script works correctly. (I attach results.) I will write to servicedesk.


2011.01.16 03:54:23 MetaSage (EURUSD,H1) //+---- Max = 6000 -------------------+
2011.01.16 03:51:14 MetaSage (EURUSD,H1) Test =>..... etc. All other options false, for even.
2011.01.16 03:51:13 MetaSage (EURUSD,H1) Test => 2+9888=9890 false
2011.01.16 03:50:29 PM MetaSage (EURUSD,H1) Test => 309+64=373 true
2011.01.16 03:49:33 MetaSage (EURUSD,H1) Test => 3+6592=6595 false
2011.01.16 03:48:24 AM MetaSage (EURUSD,H1) Test => 103+192=295 false
2011.01.16 03:42:09 MetaSage (EURUSD,H1) S=373; P=19776; a=64; b=309
2011.01.16 03:42:08 MetaSage (EURUSD,H1) S=343; P=9952; a=32; b=311
2011.01.16 03:42:08 MetaSage (EURUSD,H1) S=233; P=916; a=4; b=229
2011.01.16 03:42:08 MetaSage (EURUSD,H1) S=217; P=11392; a=89; b=128
2011.01.16 03:42:08 MetaSage (EURUSD,H1) S=163; P=4192; a=32; b=131
2011.01.16 03:42:08 MetaSage (EURUSD,H1) S=137; P=4672; a=64; b=73
2011.01.16 03:41:44 MetaSage (EURUSD,H1) Test =>..... etc. All other options are false, for even.
2011.01.16 03:41:40 MetaSage (EURUSD,H1) Test => 2+888=890 false
2011.01.16 03:40:02 MetaSage (EURUSD,H1) Test => 111+16=127 true
2011.01.16 03:39:23 MetaSage (EURUSD,H1) Test => 3+592=595 false
2011.01.16 03:38:08 MetaSage (EURUSD,H1) Test => 37+48=85 false
2011.01.16 03:38:08 MetaSage (EURUSD,H1) S=127; P=1776; a=16; b=111
2011.01.16 03:38:08 MetaSage (EURUSD,H1) S=89; P=1168; a=16; b=73
2011.01.16 03:38:08 MetaSage (EURUSD,H1) S=65; P=244; a=4; b=61
2011.01.16 03:38:08 MetaSage (EURUSD,H1) S=17; P=52; a=4; b=13
2011.01.16 03:37:12 MetaSage (EURUSD,H1) With SMax=6000 PMax = SMax*(SMax/6-1) = 5994000
2011.01.16 03:37:11 MetaSage (EURUSD,H1) //+---- Max = 6000 -------------------+
2011.01.16 03:37:11 MetaSage (EURUSD,H1) //============== START ========================

 

Alexei, there is actually no ban on solutions with composite odds, it's just that they are quite rare. If the maximum permissible sum is increased, they are likely to appear more often.

Difficulties with their checking are in general far-fetched (:with fright:), they can be easily checked manually, since only odd choices need to be checked.

There are only three of them in each of our two cases.

// However the check is already built into the script, so it will work properly after repairing mql5 optimizer. It works now too, but only in debug mode.

 
Mathemat:

...............

At the same time, I propose that this is the coolest problem in the thread.

..........

Yeah, and at the same time give the branch the title of the coolest on the forum....... ;-))))
 
I'm gonna hit the shops. I'll come back and figure out how to disprove your even-numbered options directly.

If I prove at least one is valid, I'll sprinkle ashes on my head and say "Bae-ee-ee".

But if I prove the opposite, at least one of them, you'll run. OKAY?

 

S=127; P=1776; a=16; b=111

Suffice it to see how 127 is represented as the sum of the powers of two and a prime.

Er... no way. Tough case. OK, gone.

 

Mathemat:

If I prove at least one is valid, I'll sprinkle ashes on my head and say "Bae-ee-ee".

But if I prove the opposite, at least one of them, you'll run. OKAY?

Okay. But you can't prove it. There's no grounds. :)
Reason: