Math Is Fun Forum

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

You are not logged in.

#76 2014-11-03 22:22:15

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

What is your R?


'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'
I'm not crazy, my mother had me tested.

Offline

#77 2014-11-03 22:23:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

Suppose R is even. Now, N is expressible as a sum of R primes if it is expressible as a sum of R/2 even numbers each of which is greater than 2 To do this, we check if (N-2*R) is even and greater than 2.

How does it work if N = 10 and R = 5?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#78 2014-11-03 22:25:31

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Agnishom wrote:

If R is odd, we check if there is a suitable prime p such that N-p is expressible as a sum of R-1 primes.


'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'
I'm not crazy, my mother had me tested.

Offline

#79 2014-11-03 22:27:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

Okay, I got it maybe. Why?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#80 2014-11-03 22:31:22

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

What why?

I need to make a correction.

Suppose R is even. Now, N is expressible as a sum of R primes if it is expressible as a sum of R/2 even numbers each of which is greater than 2 To do this, we check if (N-2*R) is even and greater than 2.

If R is odd, we check if there is a suitable prime p such that N-p is expressible as a sum of R-1 primes.


'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'
I'm not crazy, my mother had me tested.

Offline

#81 2014-11-03 22:36:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

What are you trying to do?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#82 2014-11-03 22:38:28

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Agnishom wrote:

Expressible[748776611396, 68906072498] does not work. It goes core dump.

That


'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'
I'm not crazy, my mother had me tested.

Offline

#83 2014-11-03 22:42:20

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

You are trying to see if that is possible without actually computing them?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#84 2014-11-03 22:52:32

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Yes.


'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'
I'm not crazy, my mother had me tested.

Offline

#85 2014-11-03 22:55:08

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Sorry, post 80 still has flaws


'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'
I'm not crazy, my mother had me tested.

Offline

#86 2014-11-03 23:02:19

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

What flaws?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#87 2014-11-03 23:05:38

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

9 can be expressed as the sum of 4 primes but it thinks not.


'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'
I'm not crazy, my mother had me tested.

Offline

#88 2014-11-03 23:07:32

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

Any odd number n can be expressed as the sum of 1 + (n-3)/2 primes.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#89 2014-11-03 23:09:32

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

How can you tell?


'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'
I'm not crazy, my mother had me tested.

Offline

#90 2014-11-03 23:13:58

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

Take 15 for instance, if we subtract 3 we get 12 which of course can be broken down into 6 twos. So for any odd n take away 3 and divide n - 3 by 2. Written in math, 1 + (n-3)/2 primes.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#91 2014-11-03 23:15:27

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Okay, could you please help me write the code?


'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'
I'm not crazy, my mother had me tested.

Offline

#92 2014-11-03 23:17:11

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

That does not produce the shortest sum.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#93 2014-11-03 23:21:05

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

The shortest sum?


'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'
I'm not crazy, my mother had me tested.

Offline

#94 2014-11-03 23:22:10

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

Yes, 2 + 2 + 2 + 2 + 2 + 2 + 3 = 15 is only 1 possible representation.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#95 2014-11-03 23:23:00

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

How does it matter?


'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'
I'm not crazy, my mother had me tested.

Offline

#96 2014-11-03 23:25:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

It does not but I do not see a way to answer whether 123456789 is the sum of 65 primes.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#97 2014-11-03 23:46:40

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

Does Goldbach help?


'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'
I'm not crazy, my mother had me tested.

Offline

#98 2014-11-03 23:48:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

There has been some proofs for R >= 3.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#99 2014-11-04 02:01:12

Agnishom
Real Member
From: Riemann Sphere
Registered: 2011-01-29
Posts: 25,002
Website

Re: Sum of R primes?

hmm Can you sign up on Hackerrank?


'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'
I'm not crazy, my mother had me tested.

Offline

#100 2014-11-04 05:12:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Sum of R primes?

I think I am greatly overextended as it is.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB