All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Primes square (Posted on 2014-02-07)
Create a 4x4 array of digits such that:

the 4 rows read from left to right are prime numbers with digits in non-increasing order;

the 4 columns read from top to bottom are prime numbers with digits in non-increasing order;

and the 8 primes are all different.

The solution is unique.

 No Solution Yet Submitted by Jer Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 Computer approach (spoiler) Comment 1 of 1
Brute force mostly..

A=Select[Map[IntegerDigits,Select[Range[1000,9999],PrimeQ]],Sort[#,Greater]==#&];
S=Subsets[A,{4}];
Do[P=Permutations[s];
Do[If[Union[Map[OddQ,p[[4]]]]=={True},
T=Transpose[p];
If[Intersection[T,p]=={},
If[Union[Map[MemberQ[A,#]&,T]]=={True},Print[MatrixForm[p]]]]],
{p,P}],
{s,S}];

which gives:

9 8 8 7
9 6 4 3
7 6 4 3
3 3 3 1

and its transpose.

 Posted by Harry on 2014-02-09 16:21:00

 Search: Search body:
Forums (1)