MathGroup Archive 2006

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

Search the Archive

Re: Repeated sequence

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64000] Re: Repeated sequence
  • From: "Borut Levart" <BoLe79 at gmail.com>
  • Date: Fri, 27 Jan 2006 05:13:11 -0500 (EST)
  • References: <dr80a3$ph3$1@smc.vnet.net><dra3vb$mb6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I must say I've hoped to get a response with some nice, clean solution,
featuring Repeated pattern (p..). I don't think the solution of
Jens-Peer Kuska is anywhere near that.

Valeri Astanoff mailed me a solution, which I like, even though it's
different from what I first imagined:

Cases[#, _List] & /@ (list //.
     {a___, 10, x_?NumericQ, 20, y_?NumericQ, b___} -> {a, {x, y}, b})


  • Prev by Date: Re: deleting cells in mathematica
  • Next by Date: Re: How to define a constant in mathematica like Pi
  • Previous by thread: Re: Repeated sequence
  • Next by thread: Re: Repeated sequence