MathGroup Archive 2011

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

Search the Archive

Re: find missing numbers in a series

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119050] Re: find missing numbers in a series
  • From: Peter Pein <petsie at dordos.net>
  • Date: Fri, 20 May 2011 06:40:27 -0400 (EDT)
  • References: <ir2vma$h0r$1@smc.vnet.net>

Am 19.05.2011 13:42, schrieb shippee:
> I have a series of numbers ranging from PE00001 to PE99999.
> Sample/Snippet below (descending order):
> PE00445
...
> PE00261
> PE00260
> 
> What would be the best approach to have mathematica show me what
> STRINGS are missing from this series?
> 
> Thanks in advance,
> 
> Steven Shippee
> Olympia, Washington
> 

sorry, that shoud read:

(StringJoin @@ {"PE", PadLeft[Characters[#], 6, "0"]}) & /@
 ToString /@
  Complement[Range[260, 445],
   ToExpression[StringDrop[#, 2] & /@ data]]

in my previous post :-(

Peter


  • Prev by Date: Re: How To Break Long List to m-by-n MatrixForm
  • Next by Date: Re: How To Break Long List to m-by-n MatrixForm
  • Previous by thread: find missing numbers in a series
  • Next by thread: Re: find missing numbers in a series