[Tutor] Finding a repeating sequence of digits

Richard D. Moores rdmoores at gmail.com
Sat Jan 2 12:57:41 CET 2010


On Sat, Jan 2, 2010 at 02:33, Shashwat Anand <anand.shashwat at gmail.com> 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 digits can be. For example, for the fairly simple fraction,
21/94, here's the mantissa to
1199 places:

"22340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723404255319148936170212765957446808510638297872340425531914893617021276595744680851063829787234042553191489361702127659574468085106382978723".

If I've done it correctly, the repeating sequence is
"234042553191489361702127659574468085106382978", which has 45 digits!

Dick Moores


More information about the Tutor mailing list