Live data from Hacker News

Techniques for Factoring Numbers in Your Head

exupero.org

1–10 of 38 posts

Re: Techniques for Factoring Numbers in Your Head

#3
Tip: you only need to factor it to the midpoint. Factors occur in pairs. Identifying the smallest factors will automatically identify the largest.

100 is divisible by 2. 2x50=100

No need to wonder if 51-99 are factors. They aren't. 50 is your largest factor.

Re: Techniques for Factoring Numbers in Your Head

#4

Tip: you only need to factor it to the midpoint. Factors occur in pairs. Identifying the smallest factors will automatically identify the largest. 100 is divisible by 2. 2x50=100 No need to wonder if 51-99 are factors. They aren't. 50 is your largest factor.

Indeed - you can even extend this idea to only identify factors less than or equal to the square root - all factors greater than this have a matching factor less than the square root.

Re: Techniques for Factoring Numbers in Your Head

#5
post #4

Tip: you only need to factor it to the midpoint. Factors occur in pairs. Identifying the smallest factors will automatically identify the largest. 100 is divisible by 2. 2x50=100 No need to wonder if 51-99 are factors. They aren't. 50 is your largest factor.

Indeed - you can even extend this idea to only identify factors less than or equal to the square root - all factors greater than this have a matching factor less than the square root.

You can also prime factor the larger factors. Once you have all the primes, you can build the other numbers.

50 = 2x5x5 So 100 = 2x2x5x5

You can build your other factors of 4,10, 20 and 25 by multiplying the subsets.

Re: Techniques for Factoring Numbers in Your Head

#7

Doerfler's _ Dead Reckoning: Calculating Without Instruments _ (pages 47-73) deals extensively with this issue. https://archive.org/stream/deadreckoningcal00doer#page/46/mo...

Picked up a copy of that book a few years ago, I think because of a comment I read here on HN. It is fantastic for learning various mental and pencil/paper techniques. Having read it helped me out with a few problems on Project Euler.

Re: Techniques for Factoring Numbers in Your Head

#8
It looks like step 4 should say something like (edited):

If b evenly divides a×r_i, where r_i is the current value, divide by b. If not, add or subtract p until the result is evenly divisible by b, then divide by b.

And step 6 should loop back to step 4 and define r_i to be the "result".

This method is very interesting and systematic, but it seems pretty complicated compared to ad hoc reasoning. E.g. 34 is a multiple of 17, so 680 must be too; 986-680 = 306, which is 34 away from 340, a multiple of 17, so 17 is a factor of 986.

Re: Techniques for Factoring Numbers in Your Head

#9
Long division is hard to do in your head, but to determine if a number is a factor, there's a technique in between long division and memorizing a graph walk that is probably easier to do mentally that either one (since you don't have to memorize a graph for each divisor). With "modulo division" you can calculate a running remainder in your head while consuming one digit at a time of the dividend, from left to right. It gets pretty easy with just a little practice. https://en.m.wikipedia.org/wiki/Short_division#Modulo_divisi...

The division by subtraction is fairly well known, of course, but it reminds me of the surprising square root by subtraction that I only learned about recently. It's probably too much to do mentally, but easy with pencil & paper.

To compute the digits of the square root of n, set a = 5n, b = 5. Repeat: if a≥b, set a=a-b, add 10 to b. Then if aI had to code it up myself just to believe it would work. http://www.afjarvis.staff.shef.ac.uk/maths/jarvisspec02.pdf

Post reply on HN