MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Prime Puzzle with Mathematica

p = Table[Prime[i], {i, 5, 25}]


Select[Subsets[p, {3}], 
 And @@ (PrimeQ /@ (Mean /@ Drop[Subsets[#], 4])) &]

{{11, 47, 71}}

Bob Hanlon

---- amzoti <amzoti at> wrote: 

Hi All,

trying to find an efficient way to this in Mathematica.

I found the answer - but it was a manual list manipulation - and it
was ugly!

Any suggestions?

3 Nice Primes:

Find three 2-digit prime numbers such that:

    * The average of any two of the three is a prime number, and
    * The average of all three is also a prime number




Bob Hanlon

  • Prev by Date: Re: Mathematica vs Latex
  • Next by Date: Docked header cell in slide show
  • Previous by thread: Re: Prime Puzzle with Mathematica
  • Next by thread: Re: Re: Prime Puzzle with Mathematica