MathGroup Archive 1995

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

Search the Archive

Re: Puzzle

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2279] Re: [mg2258] Puzzle
  • From: brucec (Bruce Carpenter)
  • Date: Mon, 23 Oct 1995 12:38:36 -0400

>Here's a nice puzzle.  Find the four numbers in the following sequence
>which total 100:  {6, 44, 30, 15, 24, 12, 33, 23, 18}.  It would seem that
>there might be a nice way to do this with Mathematica.  Any takers?
>
>Will Self
>Billings, Montana

How about this one:

In[2]:=
{6, 44, 30, 15, 24, 12, 33, 23, 18}/.
{a___,b_,c___,d_,e___,f_,g___,h_,i___}:>{b,d,f,h} /; b+d+f+h == 100
Out[2]=
{44, 15, 23, 18}

Cheers,
Bruce Carpenter




  • Prev by Date: Emacs front end for Mathematica
  • Next by Date: Re: Puzzle
  • Previous by thread: Puzzle
  • Next by thread: Re: Puzzle