Pollard's $p-1$ method

243 Views Asked by At

I've been reading some notes regarding the Pollard's $p-1$ method1 and I came across an aglorithm that (from the math standpoint) I don't fully understand:

Given that $\textbf{a = 2}$ and also in my case $p,q = \textrm{distinct primes, both > 1}\\ n = p \cdot q$

Is it possible, that when I iterate $r \in \{2, 3, ... \}$, that I come across a $r$ for which $gcd(a^{r!} - 1, n) = n$ sooner than $gcd(a^{r!} - 1, n) \in \{p,q\}$?

Because I haven't been able to find an example of that. And if I will always run into a $r$ such that $a^{r!}-1 \textrm{ divides } n$, then what is the purpose of the condition 3.a (in the link)?

TL;DR: Is the condition 3.a1 ever reachable? Given that I'm factoring a product of two distinct primes, both > 1

1

There are 1 best solutions below

0
On

OK, I'm an idiot. All I needed to do was to look for a number $2^k-1$ that would consist of two distinct prime factors, which were not in the form $2^k-1$. For example $p=23, q=89, n = p \cdot q = 2047$. Then I get: $$ \gcd(2^{11!} - 1, n) = n $$ and I have to pick a different $a$, goes all the way to $$\gcd(12^{4!} - 1,n)=89$$