Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Efficient enumeration of pandigital fractions

by kikuchiyo (Hermit)
on Jul 21, 2018 at 20:35 UTC ( [id://1219026]=note: print w/replies, xml ) Need Help??


in reply to Re: Efficient enumeration of pandigital fractions
in thread Efficient enumeration of pandigital fractions

Thanks!

Nice ideas here and elsewhere!

One nitpick: your rule 3 (that the last multiplication can't have a carry so that the numerator is base/2 - 1 digits long) doesn't mean that i < n/2, it's e (the first digit of the denominator) that has to be < n/2. i can't be 1, base/2, base-2 and base-1 (and possibly others are excluded for certain bases).

Replies are listed 'Best First'.
Re^3: Efficient enumeration of pandigital fractions
by LanX (Saint) on Jul 21, 2018 at 21:24 UTC
    > doesn't mean that i < n/2, it's e

    yeah I noticed. :)

    > i can't be 1, base/2, base-2 and base-1

    Why not base-2 ... could you elaborate?

    8 * 12.. = 96.. base-10 ?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Why not base-2 ... could you elaborate?

      8 * 1234 (the smallest possible denominator) = 9872, which is just 4 away from the largest possible numerator, 9876, so there isn't much wiggle room there. But 8 is already taken, and the next possible combination 9765, is not divisible with 8, and the quotient is less than 1234.

      In general, zyxw...(base/2-1) - (base-2) * 1234...(base/2-1) = base/2 - 1.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1219026]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-26 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found