MathGroup Archive 2008

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

Search the Archive

Re: Prime Puzzle with Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92709] Re: [mg92680] Prime Puzzle with Mathematica
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 11 Oct 2008 06:43:26 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

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

{11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}

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

{{11, 47, 71}}


Bob Hanlon

---- amzoti <amzoti at gmail.com> 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

Thanks!

~A


--

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