Re: Square roots - decimal expansions --
- From: bischar <bisch_a_r@xxxxxxxx>
- Date: Tue, 19 Jul 2005 19:18:30 EDT
> JEMebius <jemebius@xxxxxxxxx> writes in article
> <42DD4FB8.6060802@xxxxxxxxx> dated Tue, 19 Jul 2005
> 20:08:40 +0100:
> >BTW, for palindromic decimal expansions just take a
> palindromic string
> >of digits, and interpret is as a decimal expansion
> or as the period of a
> >decimal expansion.
> >It equals some rational number p/q, but there is no
> general rule to
> >predict from given p and q if p/q has a palindromic
> period.
>
> Hmmmm, I think I can write one.
>
> First count the powers of 2 and of 5 in q. Whichever
> of these is greater,
> call m-1 (meaning m is one more than that number).
> m-1 is the number of
> non-repeating digits after the decimal.
>
> Find the first n such that q|(10^n-10^m)
>
> Let p' = p * (10^n-10^m)/q mod (10^(n-m)-1)
>
> If p' is a (n-m) digit palindrome, p/q has a
> palindromic period.
>
> --Keith Lewis klewis {at} mitre.org
> The above may not (yet) represent the opinions of my
> employer.
I'm too weak, an example please!
.
- Follow-Ups:
- Re: Square roots - decimal expansions --
- From: Keith A. Lewis
- Re: Square roots - decimal expansions --
- References:
- Re: Square roots - decimal expansions --
- From: Keith A. Lewis
- Re: Square roots - decimal expansions --
- Prev by Date: Re: Trisecting an arbitrary angle
- Next by Date: Re: Square roots - decimal expansions --
- Previous by thread: Re: Square roots - decimal expansions --
- Next by thread: Re: Square roots - decimal expansions --
- Index(es):
Relevant Pages
|