this idea however doesn't seem to work.

for example, the followng code:

Code:

```
def gcd(p,q):
if p == 0:
return q
else:
return gcd(q%p,p)
N= 97*79
per = 1
start = 23**2
mult = [23]
while start not in mult:
mult += [start]
start = start**2
start = start %N
per = len(mult) -mult.index(start)
print(mult)
print(per)
print(gcd(start**(2**(per-1)) +1,N),gcd(start**(2**(per-1)) -1,N))
```