Sideway
output.to from Sideway
Number Theory

NumberPrime NumberFactorization

DivisibilityFactorizationPollard's p-1 Method


`-=[]โŸจโŸฉ\;',./~!@#$%^&*()_+{}|:"<>? ๐‘Ž๐‘๐‘๐‘‘๐‘’๐‘“๐‘”โ„Ž๐‘–๐‘—๐‘˜๐‘™๐‘š๐‘›๐‘œ๐‘๐‘ž๐‘Ÿ๐‘ ๐‘ก๐‘ข๐‘ฃ๐‘ค๐‘ฅ๐‘ฆ๐‘ง ร…โ€‰โˆ’โ€‚ร—โ€ƒโ‹…โˆ“ยฑโˆ˜๊žŠ๏นฆโˆ—โˆ™ โ„ฏ ๐”ธ๐”นโ„‚๐”ป๐”ผ๐”ฝ๐”พโ„๐•€๐•๐•‚๐•ƒ๐•„โ„•๐•†โ„™โ„šโ„๐•Š๐•‹๐•Œ๐•๐•Ž๐•๐•โ„ค๐ด๐ต๐ถ๐ท๐ธ๐น๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐‘€๐‘๐‘‚๐‘ƒ๐‘„๐‘…๐‘†๐‘‡๐‘ˆ๐‘‰๐‘Š๐‘‹๐‘Œ๐‘ โˆผโˆฝโˆพโ‰โ‰‚โ‰ƒโ‰„โ‰…โ‰†โ‰‡โ‰ˆโ‰‰โ‰Œโ‰โ‰ โ‰ก โ‰คโ‰ฅโ‰ฆโ‰งโ‰จโ‰ฉโ‰ชโ‰ซ โˆˆโˆ‰โˆŠโˆ‹โˆŒโˆ โŠ‚โŠƒโŠ„โŠ…โІโЇ ๐›ผ๐›ฝ๐›พ๐›ฟ๐œ€๐œ๐œ‚๐œƒ๐œ„๐œ…๐œ†๐œ‡๐œˆ๐œ‰๐œŠ๐œ‹๐œŒ๐œŽ๐œ๐œ๐œ‘๐œ’๐œ“๐œ” โˆ€โˆ‚โˆƒโˆ…โฆฐโˆ†โˆ‡โˆŽโˆžโˆโˆดโˆต โˆโˆโˆ‘โ‹€โ‹โ‹‚โ‹ƒ โˆงโˆจโˆฉโˆช โˆซโˆฌโˆญโˆฎโˆฏโˆฐโˆฑโˆฒโˆณ โˆฅโ‹ฎโ‹ฏโ‹ฐโ‹ฑ โ€– โ€ฒ โ€ณ โ€ด โ„ โ— สน สบ โ€ต โ€ถ โ€ท ๏น ๏น‚ ๏นƒ ๏น„ ๏ธน ๏ธบ ๏ธป ๏ธผ ๏ธ— ๏ธ˜ ๏ธฟ ๏น€ ๏ธฝ ๏ธพ ๏น‡ ๏นˆ ๏ธท ๏ธธ โœ   โ   โŽด  โŽต  โž   โŸ   โ    โก โ†โ†‘โ†’โ†“โ†คโ†ฆโ†ฅโ†งโ†”โ†•โ†–โ†—โ†˜โ†™โ–ฒโ–ผโ—€โ–ถโ†บโ†ปโŸฒโŸณ โ†ผโ†ฝโ†พโ†ฟโ‡€โ‡โ‡‚โ‡ƒโ‡„โ‡…โ‡†โ‡‡ โ‡โ‡‘โ‡’โ‡“โ‡”โ‡Œโ‡โ‡โ‡•โ‡–โ‡—โ‡˜โ‡™โ‡™โ‡ณโฅขโฅฃโฅคโฅฅโฅฆโฅงโฅจโฅฉโฅชโฅซโฅฌโฅญโฅฎโฅฏ
Draft for Information Only

Content

Pollard's p-1 Method
โ€ƒโ€ƒโ€ƒ Pollard's P-1 Methed by Smooth Number
โ€ƒโ€ƒโ€ƒโ€ƒ Pollard's P-1 Methed by Smooth Number Example 2

Pollard's p-1 Method

Pollard's p-1 method is a prime factorization algorithm discovered by John Pollard in 1974. Limited by the algorithm, the Pollard's p-1 method is only work for integers with specific factors.

If the number n has a prime factor p such that p-1 can be expressed in terms of a product of primes, the finding of prime factor p is based on the selected boundary B of the B-smooth number.  The algorithm fails when the selected boundary B is smaller than the B-smooth number of p-1.

Pollard's P-1 Methed by Smooth Number

Pollard's P-1 Methed by Smooth Number Example 2

For example: n=667=p*q=23*29; let B=5 imply

Integer B-smooth number Prime Factors number
k 5 29*35*54 = 512*243*625 77760000

Therefore for B=5, k5 or (p5-1)m5 is equal to 77760000.

Fermat's Little Theorem

let a=2, by Fermat's little theorem, let p be one of the prime factors of n, imply p idivides ak-1.

image
Greatest Common Divisor

Since ak-1 is a very large number, before finding the greatest common divisor of n and ak-1,  ak-1 can be raised to the high power modulo n. Imply

Using squarings modulo

base  number; a=2; k=77760000; n=667
ak base 10 21296000
ai base 10 21  = 21 โ‰ก 2 (mod 667)
22 = 22 ≡ 4 (mod 667)
24 = 42 ≡ 16 (mod 667)
28 = 162 ≡ 256 (mod 667)
216 = 2562 ≡ 170 (mod 667)
232 = 1702 ≡ 219 (mod 667)
264 = 2192 ≡ 604 (mod 667)
2128 = 6042 ≡ 634 (mod 667)
2256 = 6342 ≡ 422 (mod 667)
2512 = 4222 ≡ 662 (mod 667)
21024 = 6222 ≡ 25 (mod 667)
22048 = 252 ≡ 625 (mod 667)
24096 = 6252 ≡ 430 (mod 667)
28192 = 4302 ≡ 141 (mod 667)
216384 = 1412 ≡ 538 (mod 667)
232768 = 5382 ≡ 633 (mod 667)
265536 = 6332 ≡ 489 (mod 667)
2131072 = 4892 ≡ 335 (mod 667)
2262144 = 3352 ≡ 169 (mod 667)
2524288 = 1692 ≡ 547 (mod 667)
21048576 = 5472 ≡ 393 (mod 667)
22097152 = 3932 ≡ 372 (mod 667)
24194304 = 3722 ≡ 315 (mod 667)
28388608 = 3152 ≡ 509 (mod 667)
216777216 = 5092 ≡ 285 (mod 667)
233554432 = 2852 ≡ 518 (mod 667)
267108864 = 5182 ≡ 190 (mod 667)
 ak base 10 267108864+8388608+2097152+131072+32768+1024+512
 ak base 10 267108864*28388608*22097152*2131072*232768*21024*2512
ak base 10 190*509*372*335*633*25*662 ≡ 426 (mod 667)

and using the residue to calculate the greatest common divisor. Imply 

image

The greatest common divisor of n and ak-1 is

Using Euclid's algorithm

ak-1 n
277760000-1 667
426-1 667
425 667-425=242
425-242=183 242
183 242-183=59
183-3*59=6 59
6 59-9*6=5
6-5=1 5
1 5-5*1=0
1 0

Imply

image

The algorithm fails because the greatest common divisor of n and ak-1 is equal to 1. The number n does not have prime divisor p with p-1 is 5-smooth. Therefore the bound B equals to 5 fails, a larger bound B' should be used.

Let B=7,  imply

Integer B-smooth number Prime Factors number
k 29*35*54*73 = 512*243*625*343 77760000 * 343 = 26671680000

Therefore for B=7, k7 or (p7-1)m7 is equal to 77760000*343 = 26671680000. Imply  k7 =  k5 * 343. And  the new ak can be expressed as

image

And ak can be raised to the high power modulo n, imply

image

Using squarings modulo

base  number; a=426; k=343*; n=667
ak base 10 426343 (mod 667)
ai base 10 4261  = 4261 ≡ 426 (mod 667)
4262 = 4262 ≡ 52 (mod 667)
4264 = 522 ≡ 36 (mod 667)
4268 = 362 ≡ 629 (mod 667)
42616 = 6292 ≡ 110 (mod 667)
42632 = 1102 ≡ 94 (mod 667)
42664 = 942 ≡ 165 (mod 667)
426128 = 1652 ≡ 545 (mod 667)
426256 = 5452 ≡ 210 (mod 667)
426512 = 4222 ≡ 662 (mod 667)
 ak base 10 426256+64+16+4+2+1 (mod 667)
 ak base 10 426256*42664*42616*4264*4262*4261 (mod 667)
ak base 10 210*165*110*36*52*426 ≡ 581 (mod 667)

and using the residue to calculate the greatest common divisor. Imply 

image

The greatest common divisor of n and ak-1 is

Using Euclid's algorithm

ak-1 n
226671680000-1 667
581-1 667
580 667-580=87
580-6*87=58 87
58 87-58=29
58-2*29=0 29
0 29

Imply

image

Integer 29, the greatest common divisor of n and ak-1 is also the prime divisor of n. And p-1 is  7-smooth.

Integer B-smooth number Prime Factors number
p-1 7 22*71 28
k 7 29*35*54*73 = 512*243*625*343 26671680000
k/(p-1)   27*35*54*72 952560000

ยฉsideway

ID: 120500006 Last Updated: 5/15/2012 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 9

Culture

Chinese 1097

English 339

Travel 38

Reference 79

Hardware 55

Computer

Hardware 259

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 290new

Unicode 504

HTML 66new

Common Color 1new

Html Entity (Unicode) 1new

Html 401 Special 1

CSS 65new

Selector 1

SVG 46

ASP.NET 270

OS 447new

MS Windows

Windows10 1new

.NET Framework 1

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 207new

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2026 Sideway . All rights reserved Disclaimers last modified on 06 September 2019