You are on page 1of 37

FASTFACTORIZATIONALGORITHM

Iexplainbelowmyfastfactorizationalgorithm,withwhichItrytofindandantidoteto
codingbasedonprimenumbers.Thealgorithmconsistsinthreeparts:
FirstPart
Wewilluseagridwithtwoaxis.Inthehorizontalaxisthecomputerwillgenerateprime
numbers (from minor to major) and on the vertical axis it will generate the natural
numbers and their factorial decomposition. And inside the table, in each column, it
generates numbers that grow by adding to the immediate higher number the prime
numberthatisrelatedtoitscolumn.Afterthefirstoperationsthecomputerwouldget
thefollowingtable,thatIwillexplaininamoment:

Weseethereforetheprimenumbersinthehorizontalrowandthenaturalnumbersin
the vertical row, and the factorial decomposition of those that are not prime. And in
each column a series of numbers that grow in the described way. Observe that the
numbersoftheinterioraretheresultofcrossingormultiplyingthenumberinbluethat
isrelatedtothehorizontalaxiswiththenumberinblueoftheverticalaxis.
If we transfer the values of the table to and ordered list and we discard the repeated
valueswehaveallthenumbersfrom2to16decomposed,aswellastheprimenumbers,
beingthistheendoftheprocess:

Tocreatethesevalueswestartwiththefollowinggrid,thatistheupperleftcornerof
thetable:

4isobtainedbyaddingtothenumberimmediatelyabovetheprimenumberrelatedto
itscolumn(whichinthiscaseitisthesame:2+2).4inadditionistheresultofcrossingor
multiplying the frontal axis with the vertical axis. Then the computer obtains the
factorial decomposition ofthesevalues(by crossing theaxis) andmoveseverythingto
andorderedlist:

We take the primer number we found (3) to the horizontal axis, and we extend the
verticalaxistothedoubleofthelastnumber(inthiscasethedoubleof2).Andweadd
to the left of each number its factorial decomposition, which (as I said before) is
obtainedthroughtheintersectionofthetwoaxis:

Thecomputernowfillstheinsidecolumns,anditstopswhenthenumberisgreaterthan
thedoubleofthelastnumberoftheverticalaxis.Inthiscaseitstopswhenitisgreater
than 8. In the next grid the column of the prime number 3 can not grow any more,
becausenextnumber(6+3)wouldexceed8.

Andaddingthenewvalues(5to8)totheorderedlistalreadycreatedweget:

Theprocessisrepeatedandtheprimenumbers(5and7)aretakentothehorizontal
axis:

Theverticalaxiswidenstothedoubleof4andtheinnercolumnsgrowbyaddingtothe
numberimmediatelyabovetheprimenumberthatisrelatedtoitscolumn.Noneofthe
the columns must exceed the number 16. Taking as and example the columns of
numbers5and7weseethatthefollowingvalues(20and21)wouldbehigherthanthis
limit.Thenextstepistofeedthelistofdecomposednumbers,andthusweobtain:

Theprocessisrepeatedbytakingtheprimenumbers11to13tothehorizontalaxis:

Weseethatinthislasttabletheverticalaxisgrowsupto16,whichisthedoubleofthe
lastnumber(8),being32thelimitfor theinnercolumns.Thenwefeedthelist ofthe
factorizednumbersfrom17to32.

Theresultingprimenumbers(19,23,29and31)wouldbetakentothehorizontalaxis,
and the vertical axis will extend to 32. Once the internal values of the columns have
beengenerated(havingaslimit64)thelistwillgrowfrom33to64.Andsotogeneratea
listofdecomposednumberswhosesizecouldcontributetotheproposedobjective.
Astheinnercolumnsprogressivelygrow(onemoreforeachprimenumberfound)the
computer, to achieve enough speed, must work on several columns at the same time.
Besidesthenumbersofeachcolumnshouldbetakenatthesametimetotheordered
list.Wetakeasanexamplethegridfrom9to16(seenextgraphic).
Thecomputerbranches.Itgeneratesatthesametimecolumns2,3,5and7andtake
thevaluesfromeachcolumntoandemptygrid,whoseboxesfrom9to16receivethe
numbers and their factorial decomposition. Several identical numbers will go o the
identicalbox,discardingarepeatedvalue.Itisthereforearainofnumbers:

The empty grid given its progressive increase must also be made by combining
simultaneousprocesses.Thatistosay:IfIhaveanemptygridthatcontains1000boxes
thecomputershouldideallybranchin1000processes,achievingmorespeed.
Thecomputershouldnotonlyworksimultaneouslyoneachofthecolumns.Thesame
ideashouldbeusedinthesums.Inthemthefiguresareaddedatthesametime.The
computerneeds(asmuchaspossible)asmanyprocessesasfigures.Letsseehowthe
computershouldaddinthefollowingexample:


Atthesametimethecomputerfindsoutwhichpairoffiguressum10ormorethan10
(inblue),andwhichpairoffiguressum9(ingreen):

Then,forthefinalresult,ittakesintoaccountthefollowingrules:Ifthepairoffigures
situatedontherightofthosefiguresthecomputerisgoingtosumareblue,ortheyare
green and the green figures are next to blue ones (that is to say there is not a white
fringe between) it adds 1 unit to the result. Otherwise it does not add anything.
Thereforethefinalresultofthissumis:

SecondPart
In this second part of the algorithm we will create a table that contains the following
elements: The square nearest to several numbers, the base of this square and the
distancethatseparatesthesenumbersfromthatsquare.
Forexamplewechoosethefirstsquaresofthenumberlineandweseewhicharethe
nearest numbers. We also determine the distance of these numbers to their squares,
withnegativesignthosethataretotheleftofthesquares.Thesquaresandthebases
areinblue:


Thereforethenumber39is3unitsawayfrom36,whosebaseis6anditisitsnearest
square. And number 22 is 3 units away from 25, whose base is 5 and it is its nearest
square.
The computer should start this table with a number immediately higher than the last
decomposed number we found through the steps explained in the first part of the
algorithm.Onpage4thelastnumberis32sointhiscaseitmuststartwith33.Thistable
alsohastobecreatedbybranching,thatistosaythecomputercreatesatthesametime
the above stripes. If the computer branches in four processes for example, it would
createatthesametimethestripesofsquareswithbases2,3,4and5,andthenthoseof
bases6,7,8and9.
Withtheprimenumbersfoundinthefirstpartofthealgorithmthecomputerwillcreate
a new table, whose characteristics I explain below. In the table the known prime
numbers are placed in the same column, and to the right of each prime numbers the
distance between a series of square numbers and the multiple of the prime numbers
nearesttothem.
ThelistofnumberstowhichIreferbeginswiththesquareoftheprimenumberandit
endswiththedoubleoftheprimenumber.Forexample,tonumber2isrelatedtothe
squaresofnumbers2,3and4,whichare4,9and16.Number3isrelatedtothesquares
ofnumbers3,4,5and6,whichare9,16,25and26.Primenumber5isrelatedtothe
squares of numbers 5, 6, 7, 8, 9 and 10, and number 7 is related to the squares of
numbers7,8,9,10,11,12,13and14.

Webeginwithprimenumber2

The distance that separates 4 from the closest multiple of 2 (which is 4) is 0, so the
computertakesthisvalue(0)tothetable(Distance).
Thedistancethatseparatesthefollowingsquare(9)fromtheclosestmultipleof2(8)is
+1.Equallyclosewouldbe10,giventhatitis1unitawayfrom9(thereforebothvalues
wouldberight,howeverwetakethepositivevalue).
Andthedistancethatseparatesthenextsquare(16)fromtheclosestmultipleof2(also
16)is0.

Inrelationwithprimernumber3

Thedistancethatseparates9fromtheclosestmultipleof3(9)is0.
Thedistancethatseparates16fromtheclosestmultipleof3(15)is1.
Thedistancethatseparates25fromtheclosestmultipleof3(24)is1.
Thedistancethatseparates36fromtheclosestmultipleof3(36)is0.

Inrelationwithprimenumber5

Thedistancethatseparates25fromtheclosestmultipleof5(25)is0.
Thedistancethatseparates36fromtheclosestmultipleof5(35)is1.
Thedistancethatseparates49fromtheclosestmultipleof5(50)is1.
Thedistancethatseparates64fromtheclosestmultipleof5(65)is1.
Thedistancethatseparates81fromtheclosestmultipleof5(80)is1.
Thedistancethatseparates100fromtheclosestmultipleof5(100)is0.

Sowehaveatablethatuntilnumber23isasfollows.Takeintoaccountthatthereisa
symmetryandfromthehalfofthetablethedataisrepeatedinreverseorder(inblue):

Howtocalculatethisdata?Letsnowgotothetabletotakeexamples.Inallrowswe
willproceedinthesameway:
Number2

All the series of numbers begin with number 0, because the distance between the
square of a prime number and the closest multiple of the prime number is always 0
(44=0inthiscase).

Thenwemakethesum0+1=1.Ifthisresultisgreaterthanhalfoftheprimenumber(in
thiscase2/2)wesubtracttothisresulttheprimenumber.Ifitisnotgreaterthanthehalf
thereisnosubtraction.Inthiscase1isnotgreaterthan2/2,sothereisnosubtraction.
Finallywetakethisresult(1)tothetable.Thuswewouldfinishwithrow2becausethe
dataisrepeated.

Number3

Wemakethesum0+1=1.Ifthisresultisgreaterthanhalfoftheprimenumber(inthis
case 3/2) we subtract to this result the prime number. If it is not greater than the half
thereisnosubtraction.Inthiscase1isnotgreaterthan3/2,sothereisnosubtraction.
Finallywetakethisresult(1)tothetable.Thuswewouldfinishwithrow3becausethe
dataisthesame.

Number5

Wemakethesum0+1=1.Ifthisresultisgreaterthanhalfoftheprimenumber(inthis
case5/2)wesubtractfromthisresulttheprimenumber.Ifitisnotgreaterthanthehalf
thereisnosubtraction.Inthiscase1isnotgreaterthan5/2,sothereisnosubtraction.
Thecomputeraddstothelastresult(1)thenumber3(number3istheresultofadding2
unitstothesecondmemberoftheabovesum),therefore1+3=4.Thisresultisgreater
thanthehalfof5sowesubtractfromittheprimenumber:45=1.Andthecomputers
takesthisvalue(1)tothetable.Thenwewouldfinishwithrow5becausethedatais
repeated.

Number7

We make the sum 0+1=1. We take this result to the table and we see that it is not
greaterthanthehalfof7,sothereisnosubtraction.
Wemakethefollowingsum:1+3=4.Thisresultisgreaterthan7/2sowesubtractfromit
theprimenumber:47=3,andwetakethislattervaluetothetable.
Wemakethefollowingsum,thereforeweaddtothelattervaluethenumber5(number
5istheresultofadding2unitstothesecondmemberoftheabovesum):3+5=2.Given
that2isnotgreaterthan7/2thereisnosubtractionandthecomputertakesthisvalueto
thetable.Andnowthecomputerendstheprocesssincethevaluesarerepeated.

Number11

We make the sum 0+1=1. The computer takes this result to the table, and since this
resultisnotgreaterthan11/2thereisnosubtraction.
Wemakethefollowingsum:1+3=4andbeingsmallerthan11/2thereisnosubtraction.
Thenthecomputerstakethisvaluetothetable.
Wemakethefollowingsum,thereforeweaddtothelastresultthenumber5(adding2
units to the second member of the above sum): 4+5=9. 9 is greater than 11/2 so we
subtractfromittheprimenumber:911=2,andwetakethisvaluetothetable.
Wemakenextsum,whichisthesumofthelastresult(2)plusnumber5increasedin2
units:2+7=5.5isnotgreaterthan11/2sowetranslate5tothetable.
We make the following sum, that is the sum of the last result (5) plus number 7
increasedin2units:5+9=14.14isgreaterthan11/2sowesubtractfromittheprimer
number: 1411=3. And the computer takes this value to the table. Here we have
finishedsincethedataisrepeated.

Number13

Wemakethesum0+1=1andwetakethisvaluetothetable.
Wemakenextsum1+3=4,andsinceitisinferiorto13/2thereisnosubtraction.Then
thecomputertakesittothetable.
Wemakenextsum,whichisthesumofthelastresult(4)plusnumber3increasedin2
units:4+5=9.9isgreaterthan13/2sowesubtractfromittheprimenumber:913=4.
Thenwetakethisvaluetothetable.
Wemakenextsum,whichisthesumofthelastresult(4)plusnumber5increasedin2
units:4+7=3.3isnotgreaterthan13/2sothecomputertakesittothetable.
Wemakenextsum,whichisthesumofthelastresult(3)plusnumber7increasedin2
units: 3+9=12. 12 is greater than 13/2 so we subtract from it the prime number:
1213=1,andthecomputertakethisvaluetothetable.

10

Wemakenextsum,whichisthesumofthelastresult(1)plusnumber9increasedin2
units: 1+11=10. 10 is greater than 13/2 so we subtract from it the prime number:
1013=3.Andwetakethisvaluetothetable.Wefinishinthispointbecausethevalues
arerepeated.

Notethatwhenthesumsresultsarethesquareofthenaturalnumbersthevaluesare
repeatedinthesamecolumn:

Allsumsand subtractionsmustbe madeinasimultaneousway. Each pairof numbers


mustbesubtractedatthesametime:

Atthesametime,thecomputerlooksforthepairsofnumberswhoseuppernumberis
smallerthanthelowernumber(inblue),aswellasthepairsofnumbersthatarethe
same(ingreen):

For the final result the computer takes into account the following rules: If the figures
that are located to the right of those that I am subtracting are blue the computer
subtracts1unit(ifitsubtractsfrom0itwouldbe9).Ifthefiguresthatarelocatedtothe
rightofthosethatIamsubtractingaregreenandhaveabluestripenexttothem(there
isnointermediatewhitestripe)thecomputeralsosubtract1unit.Thustheresultis:

11


Letusnowapplythealgorithmtoknowwhetherthenumber396isdivisibleby11
Thefirstthingthecomputerdoesislookforthesquareclosestto396,aswellasitsbase
andthedistancethatseparatesthem(inthetablepreviouslycreated).Ifthenumberis
smaller than the square the distance will be negative, and it will be positive if it
surpassesit.
The nearest square to 396 is 400, which results from squaring the base 20. And the
distance separating them is 4. Since these data are collected from the table by the
computertheoperationisperformedina(almost)instantaneousway.
We repeat the operation again but starting with the number 20 (the base of the
previoussquare).Thenearestsquareis16,whichistheresultofsquaringbase4.The
distancebetweenthemis4.Andhere,whenthepossibledivisor(11)isgreaterthanthe
last base (4), we stop looking for squares, bases and distances. The data that the
computershouldhavefoundare,therefore,thefollowing:

Now the computer subtracts the base from the possible prime divisor: 114 =7. Then
thecomputergoestothetableofprimenumbers(page8)andintherowoftheprime
number11lookforthedatarelatedtoboxnumber7(shadedinblue),whichis5:

If we reverse the sign (5) and add it to 16 (the lower squared): 5 + 16, we get the
number11,whichisthemultiplenumberof11closestto16.Thislastoperationisnot
necessary,althoughitisIllustrativeofwhathappens.
12


Thenthisnumber(5)isaddedtothelowerdistance(4):5+4=9.Thismeansthat11is
9unitsawayfrom20.

9isequivalentto4inthetable.Ifwereversethesign(4)andadditto400(thenext
square):4+400,wegetthenumber396,whichisthemultiplenumberof11closestto
400.
Thenthisnumber(4)isaddedtothenexthigherdistance(4):4+4=0.Thismeansthat
396isat0unitsfrom396,thenitisdivisibleby11.

Let'sseenowwhether403isdivisibleby11

The first thing the computer does is look for the square nearest to 403, as well as its
base and the distance that separates them (in the previously created table). If the
numberissmallerthanthesquarethedistancewillbenegative,anditwillbepositiveif
itsurpassesit.

The square closest to 403 is 400, which results from squaring the base 20. And the
distanceseparatingthemis3.

We repeat the operation again but starting with the number 20 (the base of the
previoussquare).Thenearestsquareis16,whichistheresultofsquaringbase4.The
distancebetweenthemis4.Andhere,whenthepossibledivisor(11)isgreaterthanthe
last base (4), we stop looking for squares, bases and distances. The data that the
computershouldhavefoundare,therefore,thefollowing:

Now the base 4, below the possible prime number, is is subtracted from it: 114 = 7.
Thenthecomputergoestothetableofprimenumbers(page8)andintherowofthe
primenumber11lookforthedatarelatedtotoboxnumber7(shadedinblue),whichis
5.

13


If we reverse the sign (5) and add it to 16 (the lower squared): 5 + 16, we get the
number11,whichisthemultiplenumberof11closestto16.Thislastoperationisnot
necessary,althoughitisIllustrativeofwhathappens.
Thenthisnumber(5)isaddedtothelowerdistance(4):5+4=9.Thismeansthat11is9
unitsof20.
9isequivalentto4inthetable.Ifwereversethesign(4)andadditto400(thenext
square):4+400,wegetthenumber396,whichisthemultiplenumberof11closestto
400.
Thenthisnumber(4)isaddedtothenexthigherdistance(3):4+3=7.Thismeansthat
403is7unitsawayfrom396,thenitisnotdivisibleby11.

Letusnowapplythealgorithmtoknowifthenumber301.831.530isdivisiblebycertain
numbers.
Firstlet'sseeifitisdivisibleby23

Thefirstthingthecomputerdoesistofindthesquarenearesttothisnumber,aswellas
its base and the distance that separates them (in the table previously created). If the
numberissmallerthanthesquarethedistancewillbenegative,anditwillbepositiveif
itsurpassesit.

Thesquarenearestto301,831,530is301,821,129,whichresultsfromsquaringthebase
17,373.Andthedistancethatseparatesthemis10,401.Sincethesedataarecollected
bythecomputerinthetabletheoperationismadeinan(almost)instantaneousway.
We repeat the operation again but starting with the number 17.373 (the base of the
previoussquare).Thenearestsquareis17,424,whichistheresultofsquaringbase132.
Thedistancebetweenthemis51.

And again we repeat everything taking as starting point 132 (the previous base). The
closestsquareis121,aresultofsquaringbase11,andthedistanceinthiscaseis11.

14

And here, when the possible divisor (23) is greater than the last base (11), we stop
lookingforsquares,basesAnddistances.Thedatathatthecomputershouldhavefound
are,therefore,thefollowing:

Now the base is subtracted from the possible prime divisor: 2311 = 12. Then the
computer goes to the table of prime numbers (page 8) and in the row of the prime
number23looksforthedatarelatedtotoboxnumber12(shadedinblue),whichis6.

Ifwereversethesign(6)andweadditto121(thelowersquare):6+121,wegetthe
number115,whichisthemultiplenumberof23closestto121.Thislastoperationisnot
necessary,althoughitisIllustrativeofwhathappens.
Thenthisnumber(6)isaddedtothelowerdistance(11):6+11=17.Thismeansthat
115is17unitsawayfrom132.

17isequivalentto10inthetable.Ifwereversethesign(10)andadditto17,424(the
nextsquare):10+17.424,wegetthenumber17.434,whichisthemultiplenumberof
23closestto17.424

Thenthisnumber(10)isaddedtothenexthigherdistance(51):10+(51)=61.This
meansthat17,434is62unitsawayfrom17,373.
Iftheresultisnegativethesignisignored.Being61greaterthan23wecannotassociate
it with any number. First we must find the square closest to 61, as well as its base,
descendingtothelowersquaresandbases(werepeattheprocesswehavejustdone,
butnowwithsmallernumbers):

15

Herewestoplookingforlowersquares,since23isgreaterthan8.Then(theprocessis
thesame)wesubtractthenextlowerbase:238=15fromthepossibledivisor(23).

15means5inthetable.Ifwereversethesign(5)andweadditto64(thelowersquare,
whichinthiscaseistheonlyone):5+64,wegetthenumber69,whichisthemultiple
numberof23closestto64.

Thenthisnumber(5)isaddedtothelowerdistance,whichinthiscaseisunique(3):5
+(3)=8.Thismeansthat69isat8unitsof61.
8(asIsaidthesignisignored)isequivalentto5.Ifwereversethesign(5)andweaddit
to 301,821,129 (the following square): 10 + 301.821.129, we get the number
301.821.134, which is the multiple number of 23 nearest to 301.831.530. This last
operationisnotnecessary,althoughitisillustrativeofwhathappens.

Then this number (5) is added to the immediately superior distance 5 + 10.401 =
10.396.Thismeansthat301,821,134is10,396awayfrom301,831,530.

Being10,396greaterthan23wecannotassociateitwithanynumber.Firstwemustfind
thenearestsquare,aswellasitsbase,descendingtothelowersquaresandbases(the
processisrepeatedagain):

And here we stop looking for squares, since 23 is greater than the base 10. Then the
lowerbaseissubtractedfromthepossibleprimedivisor:2310=13.
13 implies 8 in the table. If we reverse the sign (8) and we add it to 100 (the lower
square):8+100,wegetthenumber92,whichisthemultiplenumberof23closestto
100.
Thenthisnumber(8)isaddedtothelowerdistance8+2=10.Thismeansthat92isat
10unitsof102.

16


10implies8inthetable.Ifwereversethesign(8)andweadditto10,404(thesquare
immediately above): 8 + 10.404 we get the number 10.396, which is the multiple
numberof23closestto10.396,thustheycoincide.
Thisnumber(8)isthenaddedtothenexthigherdistance8+(8)=0.Thismeansthat
10,396is0unitsawayfrom10,396,bothofwhicharethereforedivisibleby23.
Sincetheresultis0itisdeterminedthat301,831,530isdivisibleby23.Iftheresultwere
not0itwouldnotbedivisible.
Notethat301,821,134is10,396unitsawayfrom301,831,530,sothislastnumberisalso
amultipleof23.
Nowlet'sseeifthesamenumber(301.831.530)isdivisiblebetween19
Since the starting number is the same, and 19 is higher than the lower base (11), the
startingdataisidentical:

Now we subtract the base (11) from the possible prime divisor: 1911 = 8. Then the
computer goes to the table of prime numbers (page 8) and in the row of the prime
number19looksforthedatarelatedtotoboxnumber8(shadedinblue),whichis7.

Ifwereversethesign(7)andweadditto121(thelowersquare):7+121,wegetthe
number114,whichisthemultiplenumberof19closestto121.
Thenthisnumber(7)isaddedtothelowerdistance(11):7+11=18.Thismeansthat
114isat18unitsoutof132.

17

18 isequivalent to 1in the table. If we reverse the sign (1) and add it to 17,424(the
nextsquare):1+17.424,wegetthenumber17.423,whichisthemultiplenumberof19
closestto17.424.
Thenthisnumber(1)isaddedtotheimmediatelyhigherdistance(51):1+(51)=50.
Thismeansthat17,423is60unitsawayfrom17,373.
Iftheresultisnegativesignisignored.Being50greaterthan19wecannotassociateit
with any number. First we must find the square nearest to 50, as well as its base,
descendingtothelowersquaresandbases(theprocesswejustdidisrepeated,butnow
withsmallernumbers):

Herewestoplookingforlowersquares,since19isgreaterthan7.Then(theprocessis
thesame)wesubtractthenextlowerbasefromthepossibledivisor(19).197=12
12 implies 8 in the table. If we reverse the sign (8) and we add it to 49 (the lower
square,whichinthiscaseistheonlyone):8+49,wegetthenumber57,whichisthe
multiplenumberof19closestto49.
Thenthisnumber(8)isaddedtothelowerdistance,whichinthiscaseisunique(1):8
+1=7.Thismeansthat57is7unitsawayfrom50.
7(asIsaidthesignisignoredtobringittothetable)isequivalentto8.Ifwereversethe
sign (8) and we add it to 301,821,129 (the next square): 8 + 301.821.129, we get the
number301.821.137,whichisthemultiplenumberof19closestto301.831.530.

Then this number (8) is added to the next higher distance 8 + 10.401 = 10.393. This
meansthat301,821,137is10,393unitsawayfrom301,831,530.
Being10,393greaterthan19wecannotassociateitwithanynumber.Firstwemustfind
thenearestsquare,aswellasitsbase,descendingtothelowersquaresandbases(the
processisrepeatedagain):

18

Andherewestoplookingforsquares,since19islargerthanthebase10.Thenextlower
baseisthensubtractedfromthepossibledivisor(19):1910=9.
9 implies 5 in the table. If we reverse the sign (5) and we add it to 100 (the lower
square):5+100,wegetthenumber95,whichisthemultiplenumberof19closestto
100.
Thenthisnumber(5)isaddedtothelowerdistance5+2=7.Thismeans95is7units
awayfrom102.
7 implies 8 in the table. If we add it to 10,404 (the square immediately above): 8 +
10.404, we get the number 10.396, which is the multiple number of 19 closest to
10.404.

Thisnumber(8)isthenaddedtothenexthigherdistance8+(11)=19.Thismeans
that10,412isat19unitsof10,393,bothofwhicharethereforedivisibleby19.

19implies0inthetable,whichweconcludethat301,831,530isdivisibleby19.Ifitdoes
notimply0itwouldnotbedivisibleby19.

ThirdPart
Once the computer determines, by the method I just explained, that one number is
divisiblebyanother,itwillapply,todivideit,themethoddevelopedinthisthirdpart.

When dividing we always take as dividend numbers of 1 or 2 digits (0 to 98), and as


dividerandasquotientnumbersof1digit(0to9).

Forexampleinthenextdivision,inthefirstoperation,wetakeasdividendthenumber3
andasdividerthenumber2,resulting1asaquotient:

19

Inthenextdivision,inthefirstoperation,wetakeasadividendthenumber32andas
dividerthenumber3,resulting9asaquotient:

Whatquotientsarerelatedtodivider1?
Their dividends range from 1 to 18. The following divisions exemplify why of this limit
sinceinthesecondcaseitwouldbeobligedtotakeonly1digitfromthedividend:

Tofindthelargestquotientrelatedtoeachdividendwemustmultiply1byanumber
that oscillates between 1 and 9, so that the result obtained is the one closest to the
dividend.Forexample,thelargestquotientofdividend18is9.Ifwemultiply1x9wesee
thattheresultistheoneclosestto18.Thusthehighestquotientsrelatedtodivisor1
areasfollows:

Tofindthelowestquotientforeachdividend,weadda0toeachdividend(startingwith
2,whichwouldbe20)andwedivideitbythenumber19.Whythenumber19?Because
totherightof1thenumbergreaterthanonefigureis9,andthuswemakesurethatthe
quotientistheminimum:

20

Andsoupto180dividedby19.

Individend1themaximumandtheminimum(1and1)coincide.Thusthetableof
minimumandmaximumquotientsisasfollows:

Ifwedivide,forexample,153,987,450by1697,sincethedivisorstartsat1wegotothe
tableandseewhatquotientsarerelatedtothedividend15,whichcanbe7,8or9.And,
indeed,thefirstquotientis9.
Ifwedivide129,989,121by1399,sincethedivisorstartsat1wegotothetableandsee
whatquotientsarerelatedtothedividend12,whichcanbe6,7,8or9.And,indeed,
thefirstquotientis9.

Ifwedivide8341by129,sincethedivisorstartsat1wegotothetableandseewhat
quotientsarerelatedtothedividend8,whichcanbe4,5,6,7or8.And,indeed,thefirst
quotientis6.

Ifwewanttoseewhichquotientsarerelatedtotheotherdivisors(2to9)weproceed
identically.Forexample,let'sseewhichquotientsarerelatedto3:

Theirdividendsrangefrom3to38.Thefollowingdivisionsexemplifythereasonforthis
limit since in the second case you would be required to take only 1 digit from the
dividend:

Ifthedivisorwere4thedividendswouldrangebetween4and48,if5between5and
58,if6between6and68,if7between7and78,if8between8and88,and9between
9and98.

21


To find the largest quotient related to each dividend we must multiply 1 by a number
that oscillates between 1 and 9, so that the result obtained is the one closest to the
dividend.Forexample,thelargestquotientofdividend28is9.Ifwemultiply3x9wesee
thattheresultistheoneclosestto27.

Tofindthelowestquotientforeachdividend,adda0toeachdividend(startingat40)
and divide it by the number 39. Why the number 39? Because to the right of 1 the
number greater than one figure is 9, and thus we make sure that the quotient is the
minimum:

Andsoupto380dividedby39.
In dividend 3 the maximum and the minimum (1 and 1) coincide. Thus the table of
minimumandmaximumquotientsisasfollows:

Ifwedivide,forexample,153,987,450by3,697,sincethedividerstartswith3,wegoto
theprevioustableandseewhatquotientsarerelatedtothedividend15,whichcanbe
3,4or5.And,indeed,thefirstquotientis4.

22

Ifwedivide,forexample,293,900,450by3,112,sincethedividerbeginswith3,wegoto
theprevioustableandseewhatquotientsarerelatedtothedividend29,whichcanbe
7,8or9.And,indeed,thefirstquotientis9.

Ifwedivide,forexample,793,900,450by31,sincethedividerstartswith3,wegotothe
previoustableandseewhichquotientsarerelatedtothedividend7,whichcanbe1or
2.And,indeed,thefirstquotientis2.
With the rest of dividers (4 to 9) we would proceed in an identical way to create the
tableofpossiblequotients.

Letusnowseeanothercharacteristicofthedivisionthatwewilltakeintoaccountinour
algorithm:Therestalwaysoscillatesbetween0andanumberthatis1unitsmallerthan
thedividerIfIdivide,forexample,300by31,Icanneverexpecttheresttobeequalto
orgreaterthan31,ortheresttobelessthan0.

Now let's look at the alternative method I propose to divide, in order to substantially
increasethespeedofdivision.Suppose,forexample,thatIwanttomakethefollowing
division:

Justastheadditionandsubtractionweredonesimultaneously,wewilldothesamewith
thedivision,althoughthemethodissomewhatmorecomplicated.

Theremainderofthefirstrowrangesfrom30to00,sincethedivideris31,andthena0
isadded.Thustheremainderscanbethefollowing31:

23


Theremaindersofthesecondrowoscillatesthesame(between30and00),andthena
6isadded.Thiswaytheremainderscanbethefollowing31

Theremaindersofthethirdrowoscillatesthesame(between30and00),andthena7is
added.Thiswaytheremainderscanbethefollowing31:

Thusthereare93possibleremainders(31remaindersx3rows)andthecomputerwill
divideallofthembetweentheirpossiblequotientssimultaneously.

Aswehavejustseeneachpossibleremainderisrelatedto1orseveralquotients,for
exampletheremaindersofrow1arerelatedtothefollowingquotients(whenthe
remainderislessthanthedivisorthequotientis0).

Second row:

24

Thirdrow:

The computer, therefore, is calculating simultaneously 201 operations (67 operations


perrow).
Onceallthedivisionshave beenmade, thecomputer unitesalltherelations between
the quotients and remainders, linking all the rows at the same time (I will give an
exampletoclarifyit).Andoncehehasdivided53by31itdecideswhatlinkisrelatedto
this result, which is the following: (quotient 1, remainder 220) related to the number
220 of the first row (quotient 7, remainder 036). Also this last remainder has been
relatedtothenumber036ofthesecondrow(quotient1,remainder057).Andtofinish
thislastremainderhasbeenrelatedtothethirdrow(quotient1,remainder26).Allthis
datahas beenachieved by the computer very quickly sinceit haspreviouslylinkedall
thedata(withthesuccessfuluseofsimultaneousprocesses).

Letusnowlookattheexampleanddivide31057by11:

Thepossibleremaindersofthefirstrow,sincethedivideris11,canoscillatebetween0
and10.Addinga0after:00to100.
Thepossibleremaindersofthesecondrowcanrangefrom0to10butwitha5,so05to
105.
Andtheremaindersofthethirdrowrangefrom0to10byaddinga7,so07and107.

25

Allthesedivisionsaremadeatthesametime,thecomputerfindsallthepossiblelinksat
once,butchoosetheonemarkedinyellow,since31dividedby11givesasremainder
090.Anotherpossiblelinktogiveanexample,wouldbethegreenone.

Thecomputernotonlycalculatesalltheseoperationsatthesametime;Afurtherlevel
of atomization is also required when dividing the dividends related to the quotient
range.Iexplainbelowthestepsofthisnewbranchthroughseveralexamples

Supposethecomputerdivides300by31.Possiblequotientsare7,8,and9.
Webeginwithquotientnumber7:

1stoperation:Itisdividednormallytaking7asquotient,thatis:7x1=7,107=3,and
thecomputertakes1.
2ndoperation(simultaneous):Thequotient(7)ismultipliedbythefollowingnumberof
thedivider(3):7x3=21

Sincethequotientis7thenumbersthatcanbeaddedto21canrangefrom0to7:

26


Ifthecomputeradds0:21+0=21,3021=9
Ifthecomputeradds1:21+1=22,3022=8
Ifthecomputeradds2:21+2=23,3023=7
Ifthecomputeradds3:21+3=24,3024=6
Ifthecomputeradds4:21+4=25,3025=5
Ifthecomputeradds5:21+5=26,3026=4
Ifthecomputeradds6:21+6=27,3027=3
Ifthecomputeradds7:21+7=28,3028=2

Ifthedividendweresmallerthanthedivider,itwouldobviouslynotbenecessarytoadd
anynumbers.Thequotientinthiscasewouldbe0.
Possiblequotient8

1stoperation:Itisdividednormallytaking8asaquotient,then:8x1=8,108=2,and
thecomputertakes1.

2ndoperation(simultaneous):Thequotient(8)ismultipliedbythefollowingnumberof
thedivider(3):8x3=24
Sincethequotientis8thenumbersthatcanbeaddedto21canrangefrom0to8:

Ifthecomputeradds0:24+0=24,3024=6
Ifthecomputeradds1:24+1=25,3025=5
Ifthecomputeradds2:24+2=26,3026=4
Ifthecomputeradds3:24+3=27,3027=3
Ifthecomputeradds4:24+4=28,3028=2
Ifthecomputeradds5:24+5=29,3029=1
Ifthecomputeradds6:24+6=30,3030=0
Ifthecomputeradds7:24+7=31,4031=9
Ifthecomputeradds8:24+8=32,4032=8

27


Possiblequotient9

1stoperation:Itisdividednormallybytaking9asaquotient,then:9x1=9,109=1,
andthecomputertakes1.

2ndoperation(simultaneous):Thequotient(9)ismultipliedbythefollowingnumberof
thedivider(3):9x3=27
Sincethequotientis9thenumbersthatcanbeaddedto21canrangefrom0to9:

Ifthecomputeradds0:27+0=27,3027=3
Ifthecomputeradds1:27+1=28,3028=2
Ifthecomputeradds2:27+2=29,3029=1
Ifthecomputeradds3:27+3=30,3030=0
Ifthecomputeradds4:27+4=31,4031=9
Ifthecomputeradds5:27+5=32,4032=8
Ifthecomputeradds6:27+6=33,4033=7
Ifthecomputeradds7:27+7=34,4034=6
Ifthecomputeradds8:27+8=35,4035=5
Ifthecomputeradds9:27+9=36,4036=4

Once the computer has calculated these 28 operations simultaneously it links all the
data(alsosimultaneously).
Forquotient7wehavethefollowingdata,andthecomputerchoosesthoseshadedin
purple:

1stoperation:Itiscalculatednormallybytaking7asaquotient,then:7x1=7,107=3,
andthecomputertakes1.

28

2ndoperation(simultaneous):Thequotient(7)ismultipliedbythefollowingnumberof
thedivider(3):7x3=21

Sincethequotientis7thenumbersthatcanbeaddedto21canrangefrom0to7:

Ifthecomputeradds0:21+0=21,3021=9
Ifthecomputeradds1:21+1=22,3022=8
Ifthecomputeradds2:21+2=23,3023=7
Ifthecomputeradds3:21+3=24,3024=6
Ifthecomputeradds4:21+4=25,3025=5
Ifthecomputeradds5:21+5=26,3026=4
Ifthecomputeradds6:21+6=27,3027=3
Ifthecomputeradds7:21+7=28,3028=2
Withthislinkthecomputerfindsthattheremainderofdividing300by31is83.Since83
isgreaterthan30(whichwouldbethelargestpossiblequotient)discards7asapossible
divisor.

Forquotient8wehavethefollowingdata,andthecomputerlinks(simultaneously)the
datainpurple:

1stoperation:Thecomputercalculatesnormally,taking8asaquotient,then:8x1=8,
108=2,andtakes1.

2ndoperation(simultaneous):Thequotient(8)ismultipliedbythefollowingnumberof
thedivider(3):8x3=24
Sincethequotientis8thenumbersthatcanbeaddedto21canrangefrom0to8:

Ifthecomputeradds0:24+0=24,3024=6
Ifthecomputeradds1:24+1=25,3025=5
Ifthecomputeradds2:24+2=26,3026=4

29

Ifthecomputeradds3:24+3=27,3027=3
Ifthecomputeradds4:24+4=28,3028=2
Ifthecomputeradds5:24+5=29,3029=1
Ifthecomputeradds6:24+6=30,3030=0
Ifthecomputeradds7:24+7=31,4031=9
Ifthecomputeradds8:24+8=32,4032=8

Withthislinkthecomputerdeterminesthattheremainderofdividing300by31is52.
Since52isgreaterthan30(whichwouldbethelargestpossiblequotient)discards8asa
possibledivisor.

Forquotient9wehavethefollowingdata,andthecomputerchoosesthedatainpurple
(simultaneously):

1stoperation:Itiscalculatednormallybytaking9asaquotient,then:9x1=9,109=1,
andthecomputertakes1.
2ndoperation(simultaneous):Thequotient(9)ismultipliedbythefollowingnumberof
divisor(3):9x3=27
Sincethequotientis9thenumbersthatcanbeaddedto21canrangefrom0to9:

Ifthecomputeradds0:27+0=27,3027=3
Ifthecomputeradds1:27+1=28,3028=2
Ifthecomputeradds2:27+2=29,3029=1
Ifthecomputeradds3:27+3=30,3030=0
Ifthecomputeradds4:27+4=31,4031=9
Ifthecomputeradds5:27+5=32,4032=8
Ifthecomputeradds6:27+6=33,4033=7
Ifthecomputeradds7:27+7=34,4034=6
Ifthecomputeradds8:27+8=35,4035=5
Ifthecomputeradds9:27+9=36,4036=4

30


Withthisrelationthecomputerdeterminesthattheremainderofdividing300by31is
21.Since21islessthanorequalto30(which wouldbethelargestpossiblequotient)
statesthatthequotientis9.Andherewewouldendtheprocess.
Around5,628operationswouldbeneededtocalculatethedivisionItookbeforeasan
example

The key, then, is a computer program designed to branch operations into its simplest
elements, a system of blood capillaries that endows the algorithm with the necessary
nutrients.

Ifwehad,forexample,asystemthatprovided1,000millionsimultaneousprocesses,we
wouldreusethosesameprocessestocontinueoperationswithinthesamedivision.Itis
likeanarmyoftermitesthatwouldliketoeatachair,firsttheywouldstartwithoneleg,
thenanother,etc.
Let'sseeanotherillustrativeexample,inthiscase4arethefiguresofthedivider:

Heretheonlypossiblequotientis2,sowegodirectlytotheprocessbranchrelativeto
theinternalprocessesofthisquotient:
1st operation : The computer takes 2 as quotient: 9x2=18, 2318=5 and the computer
takes2.
2ndoperation(simultaneous):Thequotient(2)ismultipliedbythefollowingnumberof
thedivider(8):8x2=16

31

Sincethequotientis2thefiguresthatcanbeaddedto16canrangefrom0to2:
Ifthecomputeradds0:16+0=16,2516=9,andittakes2
Ifthecomputeradds1:16+1=17,2517=8,andittakes2
Ifthecomputeradds2:16+2=18,2518=7,andittakes2
3rd operation (simultaneous). The quotient (2) is multiplied by the next digit of the
divider(7).Sincethequotientis2thefiguresthatcanbeaddedto14oscillatebetween
0and2:

Ifthecomputeradds0:14+0=14,1714=3,andittakes1
Ifthecomputeradds1:14+1=15,1715=2,andittakes1
Ifthecomputeradds2:14+2=16,1716=1,andittakes1

4thoperation(simultaneous).Thequotient(2)ismultipliedbythenextnumberofthe
divider(9).Sincethequotientis2thefiguresthatcanbeaddedto18oscillatebetween
0and2:

Ifthecomputeradds0:18+0=18,2318=5
Ifthecomputeradds1:18+1=19,2319=4
Ifthecomputeradds2:18+2=20,2320=3
Finally, the computer establishes all relations at once. That is, relations 1, 2 and 3 are
establishedatthesametime:

Letusnowseeanotherexampleofsimultaneousdivision:

32

Weseethatthedividerstartswith2,thenthepossiblequotients(calculatedbythe
methodexplainedabove)wouldbe:

Theremainderofthefirstrowwillrangefrom278to000,sincethedivideris279.And
thena4isadded.Inthiswaytheremainderscanbe279(nextIwritethefirst5divisors
aswellastheirpossiblequotients):

The computer will divide all the remains by evaluating the possible quotients
simultaneously.

Oncethecomputerhasdivided9574between279(quotient3,remainder120)relates
120tothenumber120ofthefirstrow(quotient4,remainder088).Ifthereweremore
rows,thecomputerwouldcontinuetorelatenumbers,untilreachingthelastrow(asin
thepreviousdivision).

AsIexplainedthecomputernotonlycalculatesatthesametimealltheseoperations;
Anadditionallevelofbranchingisrequiredwhendividingthedividendsassociatedwith
thequotientrange.

Supposethecomputerdivides957by279.Possiblequotientsare3and4

Let'sstartwithquotient3:

33

1stoperation:Itiscalculatedinanormalway,bytaking3asaquotient,then:9x3=27,
2727=0,andthecomputertakes2.

2nd operation (simultaneous): The quotient (3) is multiplied by the next digit of the
divisor(7):7x3=21.Sincethequotientis3,thenumbersthatcanbeaddedto21can
rangefrom0to3:
Ifthecomputeradds0:21+0=21,2521=4
Ifthecomputeradds1:21+1=22,2522=3
Ifthecomputeradds2:21+2=23,2523=2
Ifthecomputeradds3:21+3=24,2524=1

3rdoperation(simultaneous):Thequotient(3)ismultipliedbythefollowingnumberof
divider(2):3x2=6.Andsincethequotientis3,thenumbersthatcanbeaddedto6can
rangefrom0to3:
Ifthecomputeradds0:6+0=6,96=3
Ifthecomputeradds1:6+1=7,97=2
Ifthecomputeradds2:6+2=8,98=1
Ifthecomputeradds3:6+3=9,99=0
Possiblequotient4:

1st operation: It is calculated in a normal way taking 4 as a quotient, then: 9x4 = 36,
3736=1,andthecomputertakes3.

2nd operation (simultaneous): The quotient (4) is multiplied by the next digit of the
divider (7): 7x4 = 28. Since the quotient is 4, the figures that can be added to 28 can
rangefrom0to4

34

Ifthecomputeradds0:28+0=28,3528=7
Ifthecomputeradds1:28+1=29,3529=6
Ifthecomputeradds2:28+2=30,3530=5
Ifthecomputeradds3:28+3=31,3531=4
Ifthecomputeradds4:28+4=32,3532=3
3rdoperation(simultaneous):Thequotient(4)ismultipliedbythefollowingnumberof
thedivider(2):2x4=8.Sincethequotientis4,thefiguresthatcanbeaddedto8can
rangefrom0to4:
Ifthecomputeradds0:8+0=8,98=1
Ifthecomputeradds1:8+1=9,99=0
Ifthecomputeradds2:8+2=10,910=1
Ifthecomputeradds3:8+3=11,911=2
Ifthecomputeradds4:8+4=12,912=3
Oncethecomputerhasdonethese20operationssimultaneouslyfindsalinkbetweenall
theresults.Iputinpurplethelinksthatitchooses:

Let'sstartwithquotient3:

1stoperation:Thecomputercalculatesnormallyandtakes3asquotient,then:9x3=27,
2727=0,andittakes2
2nd operation (simultaneous): The quotient (3) is multiplied by the next digit of the
divider(7):7x3=21.Sincethequotientis3,thenumbersthatcanbeaddedto21can
rangefrom0to3:
Ifthecomputeradds0:21+0=21,2521=4
Ifthecomputeradds1:21+1=22,2522=3
Ifthecomputeradds2:21+2=23,2523=2
Ifthecomputeradds3:21+3=24,2524=1
3rdoperation(simultaneous):Thequotient(3)ismultipliedbythefollowingnumberof
35

thedivider(2):3x2=6.Andsincethequotientis3thenumbersthatcanbeaddedto6
canrangefrom0to3:
Ifthecomputeradds0:6+0=6,96=3
Ifthecomputeradds1:6+1=7,97=2
Ifthecomputeradds2:6+2=8,98=1
Ifthecomputeradds3:6+3=9,99=0

Possiblequotient4:

1stoperation:Thecomputertakes4asaquotient,then:9x4=36,3736=1,andittakes

3:
2nd operation (simultaneous): The quotient (4) is multiplied by the next digit of the
divider (7): 7x4 = 28. Since the quotient is 4, the figures that can be added to 28 can
rangefrom0to4:

Ifthecomputeradds0:28+0=28,3528=7
Ifthecomputeradds1:28+1=29,3529=6
Ifthecomputeradds2:28+2=30,3530=5
Ifthecomputeradds3:28+3=31,3531=4
Ifthecomputeradds4:28+4=32,3532=3

3rdoperation(simultaneous):Thequotient(4)ismultipliedbythefollowingnumberof
thedivider(2):2x4=8.Sincethequotientis4,thefiguresthatcanbeaddedto8can
rangefrom0to4:
Ifthecomputeradds0:8+0=8,98=1
Ifthecomputeradds1:8+1=9,99=0
Ifthecomputeradds2:8+2=10,910=1
Ifthecomputeradds3:8+3=11,911=4

36

Ifthecomputeradds4:8+4=12,912=3

Withrelateddatathecomputer(simultaneously)choosesquotient3whoseremainder
is120,whichissmallerthanthedivider(279)andrejectsthedivider4.
With this method, if there is a high enough branch of processes, the time spent in
makinganydivisionwouldbethesame.
AndhereIfinishtheexplanation.Ifyouwanttowritemedonothesitatetodoso,to
clarifyanypointorcommentwhatyouconsideropportune.
Thanksandregards
Miguelngel.
30122016

37

You might also like