MathGroup Archive 2002

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

Search the Archive

Position within a list


Hello.  A long time ago someone posted an elegant solution, but I can not
find it in the Archives.
Given a list that may have repeating data, this returned the character that
was repeated the most, and its position..

The example given was a list of the first 10,000 digits of Pi.  I believe
the answer was that the number 9 was repeated 6 times around position
700 or 800.
The function was very short and elegant.
I don't believe the Split function was used, but I might be wrong.

Does anyone know how to do this?  Thank you.

lst = RealDigits[Pi,10,10000][[1]];

The list would have...
{3, 1, 4, 1, 5, 9, 2, 6, etc)


--
Dana DeLouis
Windows XP  & Mathematica 4.1
= = = = = = = = = = = = = = = = =





  • Prev by Date: Product - Integrals
  • Next by Date: Re: Output control
  • Previous by thread: Product - Integrals
  • Next by thread: Re: Position within a list