Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Robert Berman
Thank to everyone who contributed to this thread. I did have the horrible feeling this would probably end up as either total brute force or brute force perhaps with a twist. It was in the hopes of finding a twist I requested comments and suggestions from people whose opinions and suggestions are al

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Rich Lovely
2010/1/2 Robert Berman : > Hi, > > I am trying to build an algorithm or methodology which will let me tell > if a decimal has a repeating sequence of digits and if it does have that > attribute, what is the sequence of digits. For example, 1/3.0 = > 0.3..By eyeballing we know it has a repea

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Lie Ryan
On 1/2/2010 1:01 PM, Robert Berman wrote: Hi, I am trying to build an algorithm or methodology which will let me tell if a decimal has a repeating sequence of digits and if it does have that attribute, what is the sequence of digits. For example, 1/3.0 = 0.3..By eyeballing we know it has

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Eike Welk
Hello Robert! On Saturday 02 January 2010, Robert Berman wrote: > Hi, > > I am trying to build an algorithm or methodology which will let me > tell if a decimal has a repeating sequence of digits If you are starting from fractions, I think you have to find the prime factors of the denominator. I

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Kent Johnson
On Fri, Jan 1, 2010 at 9:01 PM, Robert Berman wrote: > Hi, > > I am trying to build an algorithm or methodology which will let me tell > if a decimal has a repeating sequence of digits and if it does have that > attribute, what is the sequence of digits. For example, 1/3.0 = > 0.3..By eyeb

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Dave Angel
Robert Berman wrote: Hi, I am trying to build an algorithm or methodology which will let me tell if a decimal has a repeating sequence of digits and if it does have that attribute, what is the sequence of digits. For example, 1/3.0 = 0.3..By eyeballing we know it has a repeating sequence

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Richard D. Moores
On Sat, Jan 2, 2010 at 02:33, Shashwat Anand wrote: > > What you are searching for is sheer bruteforce however if I'm guessing it > right then you are solving Project Euler and you are thinking in wrong > direction. Well, going with brute force, I'm amazed at how long some strings of repeating

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread Shashwat Anand
What you are searching for is sheer bruteforce however if I'm guessing it right then you are solving Project Euler and you are thinking in wrong direction. On Sat, Jan 2, 2010 at 3:52 PM, spir wrote: > Robert Berman dixit: > > > Hi, > > > > I am trying to build an algorithm or methodology which

Re: [Tutor] Finding a repeating sequence of digits

2010-01-02 Thread spir
Robert Berman dixit: > Hi, > > I am trying to build an algorithm or methodology which will let me tell > if a decimal has a repeating sequence of digits and if it does have that > attribute, what is the sequence of digits. For example, 1/3.0 = > 0.3..By eyeballing we know it has a repeati

[Tutor] Finding a repeating sequence of digits

2010-01-01 Thread Robert Berman
Hi, I am trying to build an algorithm or methodology which will let me tell if a decimal has a repeating sequence of digits and if it does have that attribute, what is the sequence of digits. For example, 1/3.0 = 0.3..By eyeballing we know it has a repeating sequence and we know that the s