Re: Prime Sums In A Grid
- From: Tim Woodall <devnull@xxxxxxxxxxxxx>
- Date: Tue, 24 Feb 2009 14:07:15 +0000 (UTC)
On Tue, 24 Feb 2009 08:38:47 -0500,
quasi <quasi@xxxxxxxx> wrote:
On Tue, 24 Feb 2009 13:27:30 +0000 (UTC), Tim Woodall
<devnull@xxxxxxxxxxxxx> wrote:
On Tue, 24 Feb 2009 05:25:21 -0500,
quasi <quasi@xxxxxxxx> wrote:
On Tue, 24 Feb 2009 01:55:29 -0800 (PST), gerry@xxxxxxxxxxxxxx wrote:25 24 23 22 19 (113)
On Feb 24, 6:18 pm, quasi <qu...@xxxxxxxx> wrote:
On Tue, 24 Feb 2009 09:07:02 +0200, Phil Carmody
This has almost certainly been done on Carlos Rivera's primepuzzles.net.
Then give the solution, if any, for n = 5.
Phil has told you where he thinks you'll find an answer.
Since you're the one who wants an answer,
shouldn't you just go there & report back to us?
I _went_ there. The place is a zoo of puzzles and problems.
Personally, I doubt that the specific problem I posed is actually
there, but if it is, presumably Phil Carmody would know where to find
it. After all, he said he was "almost certain" it had already been
done on Rivera's website.
quasi
21 20 18 17 13 (89)
16 15 14 12 2 (59)
11 9 8 7 6 (41)
10 5 4 3 1 (23)
( 83) ( 73) ( 67) ( 61) ( 41)
There are lots more.
Nice.
I assume you did a computer search, but even so, it couldn't have been
just brute force. What was your strategy?
It seems now that it may be doable for all n > 1, however if that's
the case, I doubt that we will be able to prove it.
quasi
36 35 34 33 32 29 (199)
31 30 28 27 26 25 (167)
24 23 22 21 20 17 (127)
19 18 14 12 11 9 (83)
16 15 8 4 3 1 (47)
13 10 7 6 5 2 (43)
(139) (131) (113) (103) ( 97) ( 83)
I'll need to clean up the code to do 7x7. I've got some serious
inefficiencies (It's actually code for magic squares I had lying around
that I've hacked)
Strategy was:
1. Find all the possible primes for each row.
2. Find a set of primes that sum to the n(n+1)/2. If no more then quit
with no more solutions.
3. Arrange the n*n integers so that they sum to the primes in 2. If no
solution then go back to 2.
4. Check that the columns all sum to a prime. If yes then print solution
5. continue from step 3 for another arrangement of the integers.
The big speedup would be to precalculate the possible ways of summing to
the primes calculated in 3.
Tim.
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://www.woodall.me.uk/
.
- Follow-Ups:
- Re: Prime Sums In A Grid
- From: Tim Woodall
- Re: Prime Sums In A Grid
- From: Tim Woodall
- Re: Prime Sums In A Grid
- References:
- Re: Prime Sums In A Grid
- From: Leroy Quet
- Re: Prime Sums In A Grid
- From: quasi
- Re: Prime Sums In A Grid
- From: Gerry Myerson
- Re: Prime Sums In A Grid
- From: quasi
- Re: Prime Sums In A Grid
- From: Phil Carmody
- Re: Prime Sums In A Grid
- From: quasi
- Re: Prime Sums In A Grid
- From: gerry
- Re: Prime Sums In A Grid
- From: quasi
- Re: Prime Sums In A Grid
- From: Tim Woodall
- Re: Prime Sums In A Grid
- From: quasi
- Re: Prime Sums In A Grid
- Prev by Date: Re: Elipsoid fitting question
- Next by Date: Solution manual to Engineering Mechanics Dynamics (11th Edition) by Russell C. Hibbeler
- Previous by thread: Re: Prime Sums In A Grid
- Next by thread: Re: Prime Sums In A Grid
- Index(es):
Relevant Pages
|